![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | How can i set the GrayScale for an XAML- Vector Graphic Hi @all, i develop a WPF Application with many controls, the have images as content. The images i have exportet from Expression Graphic Designer as XAML in a resource dictionary. This resource dictionary i have bind as new resource in my window. For example: <Window.Resources> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Icons.xaml"/> </ResourceDictionary.MergedDictionaries> </Window.Resources> OK. For my button i use one of the many ControlTemplates with x:Key. this is in the Icons.xaml file contained. For example: <Button> <StackPanel> <ContentControl Template ="{StaticResource MyOpenImage}" Width="20" Height="20"/> </StackPanel> </Button> My goal is it to format the colored resource vector image to an grayscale. so i think it look disabled. How can i do this? Thank you all for help best greedings and a nice day TOM www.tom-mue.de |
My System Specs![]() |
| | #2 (permalink) |
| Guest | RE: How can i set the GrayScale for an XAML- Vector Graphic Hi people, i think i found a solution. ok, at hard work i have change the type from my vector- graphic in the resource dictionary file. For example: OLD Version ResourceDictionary: <ControlTemplate x:Key="MyOpenImage"> <Viewbox Stretch="Uniform" > <Canvas Width="10.719238" Height="10.718750"> <Canvas> ...... </ControlTemplate> I can use that only with a content control. That is not which I needs. NEW Version ResourceDictionary: <DrawingImage x:Key="MyOpenImage"> <DrawingImage.Drawing> <DrawingGroup> <DrawingGroup.Children> .... </DrawingImage> Now i can use this with an image control. For example: ..... <Window.Resources> <!-- that is the external resource dictionary file --> <ResourceDictionary Source ="CircleII.xaml" /> </Window.Resources> <Grid> <Button> <Image Width="200" Source="{StaticResource Circle}"> </Image> </Button> </Grid> ...... That is which i need. cool. now i have the problem with the GrayScale for a Image. How can i set or use the GrayScale for my Image without "FormatConvertedBitmap"? Is it possible? I think i have no chance to set the Source property from "FormatConvertedBitmap" to my Circle resource. Or is it possible to set the Source property to my Circle resource? My goal is it, that the Image is disabled. Thank you for all help TOM www.tom-mue.de > Hi @all, > > i develop a WPF Application with many controls, the have images as content. > The images i have exportet from Expression Graphic Designer as XAML in a > resource dictionary. This resource dictionary i have bind as new resource in > my window. For example: > <Window.Resources> > <ResourceDictionary.MergedDictionaries> > <ResourceDictionary Source="Icons.xaml"/> > </ResourceDictionary.MergedDictionaries> > </Window.Resources> > > OK. For my button i use one of the many ControlTemplates with x:Key. this is > in the Icons.xaml file contained. For example: > > <Button> > <StackPanel> > <ContentControl Template ="{StaticResource MyOpenImage}" > Width="20" Height="20"/> > </StackPanel> > </Button> > > My goal is it to format the colored resource vector image to an grayscale. > so i think it look disabled. > > How can i do this? > > Thank you all for help > > best greedings and a nice day > TOM > www.tom-mue.de > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is it possible to include XAML files into another XAML file? | star-italia | .NET General | 6 | 06-12-2008 04:56 AM |
| Vector graphic image | Oriane | Avalon | 4 | 11-30-2007 10:59 AM |
| Grayscale Printing with HP 6110 | Kirin | Vista General | 3 | 05-27-2007 08:20 PM |
| Windows Desktop Grayscale!? | Matt B. | Vista installation & setup | 1 | 01-31-2007 03:58 PM |
| How to deploy an XAML-based App with its XAML-UI-File? | Solveigh | Avalon | 11 | 11-08-2006 07:50 AM |