Guest User

Untitled

a guest
Jun 19th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.90 KB | None | 0 0
  1. <NavBarGroupHeader>
  2. <ExplorerBarExpandButton>
  3. <Path>
  4. <SolidColorBrush/>
  5. </Path>
  6. </ExplorerBarExpandButton>
  7. </NavBarGroupHeader>
  8.  
  9. <ControlTemplate TargetType="{x:Type dxn:NavBarGroupHeader}>
  10. <Grid>
  11. <Grid.ColumnDefinitions>
  12. <ColumnDefinition/>
  13. <ColumnDefinition Width="Auto"/>
  14. </Grid.ColumnDefinition>
  15.  
  16. <VisualStateManager.VisualStateGroups>
  17. <VisualStateGroup x:Name="Common">
  18. <VisualState x:Name="Normal"/>
  19. <VisualState x:Name="MouseOver">
  20. <Storyboard>
  21. <!-- these two lines throw the exception -->
  22. <ColorAnimation Storyboard.Target="{Binding ElementName=ArrowTop}" Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Color)" Duration="0" To="#201F35"/>
  23. <ColorAnimation Storyboard.Target="{Binding ElementName=ArrowBottom}" Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Color)" Duration="0" To="#201F35"/>
  24. </Storyboard>
  25. </VisualState>
  26. </VisualStateGroup>
  27. </VisualStateManager.VisualStateGroup>
  28.  
  29. <!-- This shows a text within the header -->
  30. <dxn:ImageAndTextContentPresenter/>
  31.  
  32. <dxn:ExplorerBarExpandButton x:Name="ExplorerBarExpandButton"
  33. Grid.Column="1"
  34. Template="{StaticResource GroupBoxExpandButtonTemplate}"/>
  35.  
  36. <dxn:NavPaneExpandButton x:Name="NavPaneExpandButton"
  37. Grid.Column="1"
  38. Template="{StaticResource GroupBoxExpandButtonTemplate}"/>
  39. </Grid>
  40. </ControlTemplate>
  41.  
  42. <ControlTemplate x:Key="GroupBoxExpandButtonTemplate">
  43. <Grid>
  44. <VisualStateManager.VisualStateGroups>
  45. <VisualStateGroup x:Name="CommonStates">
  46. <VisualState x:Name="Normal"/>
  47. </VisualStateGroup>
  48. <VisualStateGroup x:Name="ExpandStates">
  49. <VisualState x:Name="Expanded"/>
  50. <VisualState x:Name="Collapsed">
  51. <Storyboard>
  52. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphClose" Storyboard.TargetProperty="(Control.Visibility)" dxcn:ValueSetter.Visibility="Collapsed"/>
  53. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphOpen" Storyboard.TargetProperty="(Control.Visibility)" dxcn:ValueSetter.Visibility="Visible"/>
  54. </Storyboard>
  55. </VisualState>
  56. </VisualStateGroup>
  57. </VisualStateManager.VisualStateGroups>
  58.  
  59. <ContentControl x:Name="GlyphClose"
  60. Template="{StaticResource CollapseExpandIconTemplate}"/>
  61. <ContentControl x:Name="GlyphOpen"
  62. Template="{StaticResource CollapseExpandIconTemplate}">
  63. <ContentControl.LayoutTransform>
  64. <RotateTransform Angle="180"/>
  65. </ContentControl.LayoutTransform>
  66. </ContentControl>
  67. </Grid>
  68. </ControlTemplate>
  69.  
  70. <ControlTemplate x:Key="CollapseExpandIconTemplate">
  71. <StackPanel>
  72. <Path x:Name="ArrowTop" Stretch="Uniform" Fill="#80838F" Data="M 0,50 25,50 50,30 75,50 100,50 100,40 50,0 0,40 Z"/>
  73. <Path x:Name="ArrowBottom" Stretch="Uniform" Fill="#80838F" Data="M 0,50 25,50 50,30 75,50 100,50 100,40 50,0 0,40 Z"/>
  74. </StackPanel>
  75. </ControlTemplate>
  76.  
  77. </Path ...>
  78. <Path.Fill>
  79. <SolidColorBrush Color="#80838F"/>
  80. </Path.Fill>
  81. </Path>
  82.  
  83. <ControlTemplate TargetType="{x:Type dxn:NavBarGroupHeader}>
  84. <Grid x:Name="HeaderRoot">
  85. <Grid.Background>
  86. <SolidColorBrush Color="White"/>
  87. </Grid.Background>
  88.  
  89. <Grid.ColumnDefinitions>
  90. <ColumnDefinition/>
  91. <ColumnDefinition Width="Auto"/>
  92. </Grid.ColumnDefinition>
  93.  
  94. <VisualStateManager.VisualStateGroups>
  95. <VisualStateGroup x:Name="Common">
  96. <VisualState x:Name="Normal"/>
  97. <VisualState x:Name="MouseOver">
  98. <Storyboard>
  99. <ColorAnimation Storyboard.Target="{Binding ElementName=HeaderRoot}" Storyboard.TargetProperty="(Grid.Background).(SolidColorBrush.Color)" Duration="0" To="#201F35"/>
  100. </Storyboard>
  101. </VisualState>
  102. </VisualStateGroup>
  103. </VisualStateManager.VisualStateGroup>
  104.  
  105. <!-- This shows a text within the header -->
  106. <dxn:ImageAndTextContentPresenter/>
  107.  
  108. <dxn:ExplorerBarExpandButton x:Name="ExplorerBarExpandButton"
  109. Grid.Column="1">
  110. <dxn:ExplorerBarExpandButton.Template>
  111. <ControlTemplate x:Key="GroupBoxExpandButtonTemplate">
  112. <Grid x:Name="ExpandButtonRoot">
  113. <VisualStateManager.VisualStateGroups>
  114. <VisualStateGroup x:Name="CommonStates">
  115. <VisualState x:Name="Normal"/>
  116. </VisualStateGroup>
  117. <VisualStateGroup x:Name="ExpandStates">
  118. <VisualState x:Name="Expanded"/>
  119. <VisualState x:Name="Collapsed">
  120. <Storyboard>
  121. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphClose" Storyboard.TargetProperty="(Control.Visibility)" dxcn:ValueSetter.Visibility="Collapsed"/>
  122. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphOpen" Storyboard.TargetProperty="(Control.Visibility)" dxcn:ValueSetter.Visibility="Visible"/>
  123. </Storyboard>
  124. </VisualState>
  125. </VisualStateGroup>
  126. </VisualStateManager.VisualStateGroups>
  127.  
  128. <ContentControl x:Name="GlyphClose">
  129. <ContentControl.Template>
  130. <ControlTemplate>
  131. <StackPanel x:Name="PathRoot">
  132. <Path x:Name="ArrowBottom" Stretch="Uniform" Fill="#80838F" Data="M 0,50 25,50 50,30 75,50 100,50 100,40 50,0 0,40 Z"/>
  133. </StackPanel>
  134. </ControlTemplate>
  135. </ContentControl.Template>
  136. </ContentControl>
  137. </Grid>
  138. </ControlTemplate>
  139. </dxn:ExplorerBarExpandButton.Template>
  140. </dxn:ExplorerBarExpandButton>
  141. </Grid>
  142. </ControlTemplate>
  143.  
  144. <ColorAnimation Storyboard.Target="{Binding ElementName=ExpandButtonRoot}" Storyboard.TargetProperty="(Grid.Background).(SolidColorBrush.Color)" Duration="0" To="#201F35"/>
Add Comment
Please, Sign In to add comment