Click here to Skip to main content
16,016,925 members
Home / Discussions / WPF
   

WPF

 
PinnedHOW TO ANSWER A QUESTION PinPopular
Chris Maunder16-Jul-09 3:09
cofounderChris Maunder16-Jul-09 3:09 
PinnedHow to get an answer to your question PinPopular
Chris Maunder16-Jul-09 3:05
cofounderChris Maunder16-Jul-09 3:05 
QuestionApp WPF Pin
Nelson196526-Sep-24 15:39
Nelson196526-Sep-24 15:39 
AnswerRe: App WPF Pin
Richard Deeming30-Sep-24 21:35
mveRichard Deeming30-Sep-24 21:35 
QuestionRenderTransform Compilation Error Pin
Kevin Marois16-Sep-24 7:15
professionalKevin Marois16-Sep-24 7:15 
I have a SpinningIndicator in a USERCONTROL. It works fine with no problems.

Now, I want to move it to a CUSTOMCONTROL. But it fails to compile on this line:
DoubleAnimation Storyboard.TargetProperty="RenderTransform.Angle" 
The error message is
Cannot resolve all property references in the property path 'RenderTransform.Angle'. Verify that applicable objects support the properties.

Here's my XAML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:ctrl="clr-namespace:Marois.Controls.ProgressIndicators">

<pre>
<Style TargetType="{x:Type ctrl:SpinningIndicator}">

    <Setter Property="Template">

        <Setter.Value>

            <ControlTemplate TargetType="{x:Type ctrl:SpinningIndicator}">

                <Border Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"
                        BorderBrush="{Binding BorderBrush, RelativeSource={RelativeSource TemplatedParent}}"
                        BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"
                        Margin="{Binding Margin, RelativeSource={RelativeSource TemplatedParent}}"
                        Padding="{Binding Padding, RelativeSource={RelativeSource TemplatedParent}}">

                    <Grid>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>

                        <Canvas Grid.Row="0" 
                                Name="Canvas1"<br />
                                RenderTransformOrigin="0.5,0.5"<br />
                                HorizontalAlignment="Center"<br />
                                VerticalAlignment="Center" 
                                Width="120" 
                                Height="120">

                            <Canvas.RenderTransform>
                                <RotateTransform Angle="0" />
                            </Canvas.RenderTransform>

                            <Canvas.Style>
                                <Style TargetType="Canvas">
                                    <Style.Triggers>
                                        <Trigger Property="IsVisible" Value="True">

                                            <Trigger.EnterActions>
                                                <BeginStoryboard Name="Storyboard_Rotate">
                                                    <Storyboard RepeatBehavior="Forever">
                                                        <DoubleAnimation Storyboard.TargetProperty="RenderTransform.Angle"
                                                                         From="0" 
                                                                         To="360" 
                                                                         Duration="0:0:3"/>
                                                    </Storyboard>
                                                </BeginStoryboard>
                                            </Trigger.EnterActions>

                                            <Trigger.ExitActions>
                                                <StopStoryboard BeginStoryboardName="Storyboard_Rotate" />
                                            </Trigger.ExitActions>

                                        </Trigger>
                                    </Style.Triggers>
                                </Style>
                            </Canvas.Style>

                            <Ellipse Width="20" Height="20" Stretch="Fill" Fill="{Binding IndicatorBrush}" Opacity="1.0" Canvas.Left="50" Canvas.Top="0" />
                            <Ellipse Width="20" Height="20" Stretch="Fill" Fill="{Binding IndicatorBrush}" Opacity="0.9" Canvas.Left="20.6107373853764" Canvas.Top="9.54915028125262" />
                            <Ellipse Width="20" Height="20" Stretch="Fill" Fill="{Binding IndicatorBrush}" Opacity="0.8" Canvas.Left="2.44717418524233" Canvas.Top="34.5491502812526" />
                            <Ellipse Width="20" Height="20" Stretch="Fill" Fill="{Binding IndicatorBrush}" Opacity="0.7" Canvas.Left="2.44717418524232" Canvas.Top="65.4508497187474" />
                            <Ellipse Width="20" Height="20" Stretch="Fill" Fill="{Binding IndicatorBrush}" Opacity="0.6" Canvas.Left="20.6107373853763" Canvas.Top="90.4508497187474" />
                            <Ellipse Width="20" Height="20" Stretch="Fill" Fill="{Binding IndicatorBrush}" Opacity="0.5" Canvas.Left="50" Canvas.Top="100" />
                            <Ellipse Width="20" Height="20" Stretch="Fill" Fill="{Binding IndicatorBrush}" Opacity="0.4" Canvas.Left="79.3892626146236" Canvas.Top="90.4508497187474" />
                            <Ellipse Width="20" Height="20" Stretch="Fill" Fill="{Binding IndicatorBrush}" Opacity="0.3" Canvas.Left="97.5528258147577" Canvas.Top="65.4508497187474" />
                            <Ellipse Width="20" Height="20" Stretch="Fill" Fill="{Binding IndicatorBrush}" Opacity="0.2" Canvas.Left="97.5528258147577" Canvas.Top="34.5491502812526" />

                        </Canvas>

                    </Grid>

                </Border>

            </ControlTemplate>

        </Setter.Value>

    </Setter>

</Style>



In theory, theory and practice are the same. But in practice, they never are.”
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.

AnswerRe: RenderTransform Compilation Error Pin
#realJSOP26-Sep-24 0:53
professional#realJSOP26-Sep-24 0:53 
Question"Refresh" Behavior Pin
Kevin Marois19-Aug-24 11:20
professionalKevin Marois19-Aug-24 11:20 
AnswerRe: "Refresh" Behavior Pin
#realJSOP12-Sep-24 4:10
professional#realJSOP12-Sep-24 4:10 
GeneralRe: "Refresh" Behavior Pin
Kevin Marois16-Sep-24 7:22
professionalKevin Marois16-Sep-24 7:22 
GeneralRe: "Refresh" Behavior Pin
#realJSOP26-Sep-24 0:54
professional#realJSOP26-Sep-24 0:54 
Questionbinding textblock to tabitem textblocks Pin
geomeo12329-Jul-24 17:00
geomeo12329-Jul-24 17:00 
Question[WPF] ComboBox with RichTextBox Pin
Member 846740328-Jul-24 6:36
Member 846740328-Jul-24 6:36 
AnswerRe: [WPF] ComboBox with RichTextBox Pin
Member 846740328-Jul-24 6:44
Member 846740328-Jul-24 6:44 
QuestionHow to create and save High Score in my Tetris game in wpf c#? Pin
Member 162860911-Jul-24 1:03
Member 162860911-Jul-24 1:03 
AnswerRe: How to create and save High Score in my Tetris game in wpf c#? Pin
Richard MacCutchan1-Jul-24 1:20
mveRichard MacCutchan1-Jul-24 1:20 
Questionselect text box lines and remove Pin
geomeo12322-Jun-24 16:30
geomeo12322-Jun-24 16:30 
AnswerRe: select text box lines and remove Pin
Richard Deeming23-Jun-24 21:47
mveRichard Deeming23-Jun-24 21:47 
GeneralRe: select text box lines and remove Pin
geomeo12324-Jun-24 7:52
geomeo12324-Jun-24 7:52 
QuestionCustom Control Based On Combobox - Replace Part Of The Combobox Pin
Kevin Marois14-Jun-24 18:27
professionalKevin Marois14-Jun-24 18:27 
AnswerRe: Custom Control Based On Combobox - Replace Part Of The Combobox Pin
Dave Kreskowiak15-Jun-24 5:48
mveDave Kreskowiak15-Jun-24 5:48 
GeneralRe: Custom Control Based On Combobox - Replace Part Of The Combobox Pin
Kevin Marois15-Jun-24 10:13
professionalKevin Marois15-Jun-24 10:13 
QuestionInvoke WPF Pin
geomeo1231-Jun-24 15:31
geomeo1231-Jun-24 15:31 
AnswerRe: Invoke WPF Pin
Richard Deeming3-Jun-24 21:38
mveRichard Deeming3-Jun-24 21:38 
GeneralRe: Invoke WPF Pin
geomeo1234-Jun-24 17:54
geomeo1234-Jun-24 17:54 
QuestionICommand Wpf form load properties? Pin
geomeo12330-May-24 14:11
geomeo12330-May-24 14:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.