Guest User

Untitled

a guest
Jan 20th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. private void Profnav_Click(object sender, EventArgs e)
  2. {
  3. switch (Profnav.IsChecked)
  4. {
  5. case true:
  6. Profnav.IsChecked = false;
  7. break;
  8. case false:
  9. Profnav.IsChecked = true;
  10. break;
  11. }
  12. }
  13.  
  14. <ToggleButton>
  15. <ToggleButton.Template>
  16. <ControlTemplate TargetType="ToggleButton">
  17. <Grid>
  18. <RadioButton IsChecked="{TemplateBinding IsChecked}"/>
  19. <Border Background="Transparent"/>
  20. </Grid>
  21. </ControlTemplate>
  22. </ToggleButton.Template>
  23. </ToggleButton>
  24.  
  25. <Window.Resources>
  26. <Style TargetType="ToggleButton" x:Key="RadioLookToggleButton">
  27. <Setter Property="Template">
  28. <Setter.Value>
  29. <ControlTemplate TargetType="ToggleButton">
  30. <Grid>
  31. <RadioButton IsChecked="{TemplateBinding IsChecked}"/>
  32. <Border Background="Transparent"/>
  33. </Grid>
  34. </ControlTemplate>
  35. </Setter.Value>
  36. </Setter>
  37. </Style>
  38. </Window.Resources>
  39.  
  40. <ToggleButton Style="{StaticResource RadioLookToggleButton}"/>
Add Comment
Please, Sign In to add comment