Quantcast
Channel: wpftoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 2157

New Post: PropertyGrid: Selection Color

$
0
0
Hi GlennRussell,

In Windows 7, from what I see in
-Toolkit/PropertyGrid/Themes/Generic.xaml
for the Style of the PropertyItemBase, (the PART_NAME) when IsMouseOver = true, a color is Harcoded. Same thing when IsSelected = true. You will have to change those colors to see a change in the Name of the properties.

So you should not include Generic.xaml in your resources, but you should download the files, modify theses colors, compile the code and use the new dll of the toolkit.

For the editor part, you could redefine the style of a PropertyGridEditorTextBox. For example :
<xctk:PropertyGrid x:Name="_propertyGrid">
         <xctk:PropertyGrid.Resources>
             <Style TargetType="{x:Type xctk:PropertyGridEditorTextBox}"
                   BasedOn="{StaticResource {x:Type xctk:WatermarkTextBox}}">
               <Style.Triggers>
                  <!-- TextBox Editor Highlight-->
                  <Trigger Property="IsMouseOver"
                           Value="True">
                     <Setter Property="Background"
                             Value="Red" />
                  </Trigger>
                   <!-- TextBox Editor Selected-->
                   <Trigger Property="IsKeyboardFocusWithin"
                           Value="True">
                     <Setter Property="Background"
                             Value="Green" />
                  </Trigger>
               </Style.Triggers>
            </Style>
            
         </xctk:PropertyGrid.Resources>
      </xctk:PropertyGrid>

Viewing all articles
Browse latest Browse all 2157

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>