![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | 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) |
| | 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 | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Is it possible to include XAML files into another XAML file? | .NET General | |||
| Grayscale Printing with HP 6110 | Vista General | |||
| Windows Desktop Grayscale!? | Vista installation & setup | |||