Hello,
I have some graphics described in a xaml way (using viewbox and path).
I use these graphics in some places, and I'd like if it is possible to use them directly in a RadRibbonButton, whithout export them in jpeg image.
for sample, here one of my graphic :
well, the aim is to keep your functionality "Large, small" but using xaml figures.
Thanks
Aurore
I have some graphics described in a xaml way (using viewbox and path).
I use these graphics in some places, and I'd like if it is possible to use them directly in a RadRibbonButton, whithout export them in jpeg image.
for sample, here one of my graphic :
<ControlTemplate x:Key="ModifFigure"> |
<Viewbox Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"> |
<Canvas Width="25.000" Height="25.000"> |
<Canvas> |
<Canvas> |
<!-- Calque 1/<Groupe>/<Tracé> --> |
<Path StrokeThickness="0.5" Stroke="#ffc4c6c8" StrokeMiterLimit="1.0" Data="F1 M 12.498,25.000 C 5.596,25.000 0.000,19.404 0.000,12.500 C 0.000,5.596 5.596,0.000 12.498,0.000 C 19.402,0.000 25.000,5.596 25.000,12.500 C 25.000,19.404 19.402,25.000 12.498,25.000 Z"> |
<Path.Fill> |
<LinearGradientBrush MappingMode="Absolute" StartPoint="396.500,312.884" EndPoint="396.500,291.182"> |
<LinearGradientBrush.GradientStops> |
<GradientStop Offset="0.00" Color="#fffefefe"/> |
<GradientStop Offset="1.00" Color="#ffdddedf"/> |
</LinearGradientBrush.GradientStops> |
<LinearGradientBrush.Transform> |
<MatrixTransform Matrix="0.000,1.000,1.000,0.000,-291.000,-383.999" /> |
</LinearGradientBrush.Transform> |
</LinearGradientBrush> |
</Path.Fill> |
</Path> |
<!-- Calque 1/<Groupe>/<Tracé> --> |
<Path StrokeThickness="1.0" Stroke="#ff8c989f" StrokeMiterLimit="1.0" Data="F1 M 12.500,21.506 C 7.525,21.506 3.492,17.475 3.494,12.500 C 3.494,7.525 7.525,3.492 12.500,3.492 C 17.473,3.492 21.506,7.525 21.506,12.500 C 21.506,17.475 17.473,21.506 12.500,21.506 Z"> |
<Path.Fill> |
<RadialGradientBrush MappingMode="Absolute" GradientOrigin="433.388,315.667" Center="433.388,315.667" RadiusX="16.788" RadiusY="16.788"> |
<RadialGradientBrush.GradientStops> |
<GradientStop Offset="0.00" Color="#fffefefe"/> |
<GradientStop Offset="1.00" Color="#ffb1bfc7"/> |
</RadialGradientBrush.GradientStops> |
<RadialGradientBrush.Transform> |
<MatrixTransform Matrix="0.000,0.802,0.802,0.000,-233.813,-335.440" /> |
</RadialGradientBrush.Transform> |
</RadialGradientBrush> |
</Path.Fill> |
</Path> |
</Canvas> |
<!-- Calque 1/<Tracé> --> |
<Path Fill="#ffe7511e" Data="F1 M 18.651,11.870 L 20.354,10.170 C 20.966,9.558 20.966,8.561 20.354,7.950 L 18.099,5.695 C 17.489,5.081 16.490,5.083 15.880,5.695 L 14.175,7.396 C 15.744,8.962 17.778,10.998 18.651,11.870 Z"/> |
<!-- Calque 1/<Tracé transparent> --> |
<Path Fill="#ff1a171b" Data="F1 M 9.038,18.250 L 7.789,17.000 L 8.886,13.998 L 12.044,17.154 L 9.038,18.250 Z M 12.833,15.531 C 12.767,15.596 12.681,15.633 12.585,15.633 C 12.495,15.633 12.406,15.596 12.341,15.531 C 12.206,15.396 12.206,15.178 12.341,15.041 L 16.595,10.793 L 15.254,9.453 L 10.979,13.717 C 10.913,13.785 10.827,13.822 10.731,13.822 C 10.641,13.822 10.554,13.785 10.486,13.717 C 10.418,13.650 10.388,13.561 10.388,13.473 C 10.388,13.385 10.418,13.297 10.486,13.229 L 14.764,8.962 C 14.764,8.962 14.275,8.477 13.684,7.886 L 8.227,13.340 L 8.231,13.346 C 8.200,13.383 8.173,13.424 8.158,13.467 L 5.943,19.543 C 5.884,19.701 5.923,19.879 6.042,19.996 C 6.160,20.119 6.337,20.156 6.496,20.098 L 12.573,17.881 C 12.621,17.867 12.661,17.836 12.697,17.807 L 12.703,17.814 L 18.159,12.361 C 17.712,11.908 17.086,11.285 17.086,11.285 L 12.833,15.531 Z"/> |
</Canvas> |
</Canvas> |
</Viewbox> |
</ControlTemplate> <Button Name="btnEdit" Style="{StaticResource NodeBtn}" Width="20" Height="20" Command="v6:Commands.EditVariableCommand" CommandParameter="Node" Visibility="{Binding Path=Data.HasItem, Converter={StaticResource convBoolVisibility}}"> <Button.Content> <ContentControl Template="{StaticResource ModifFigure}" Width="18" Height="18"/> </Button.Content> </Button> |
well, the aim is to keep your functionality "Large, small" but using xaml figures.
Thanks
Aurore