visualstategroup

VisualState in abstract control

≡放荡痞女 提交于 2019-12-10 10:19:44
问题 I have an abstract BaseControl that contains dependency properties as well as default style and VisualState. I would like to use these VisualState in inherited Controls. I understand that setting the Template of the inherited control does not enable the VisualState to access the UIElement that it needs to update. How should I proceed to properly use these VisualStates? (copy paste the VisualState in the XAML of each inherited control is not an option for me). Is it possible to access the

VisualState in abstract control

被刻印的时光 ゝ 提交于 2019-12-05 21:23:23
I have an abstract BaseControl that contains dependency properties as well as default style and VisualState. I would like to use these VisualState in inherited Controls. I understand that setting the Template of the inherited control does not enable the VisualState to access the UIElement that it needs to update. How should I proceed to properly use these VisualStates? (copy paste the VisualState in the XAML of each inherited control is not an option for me). Is it possible to access the Template of a base control from an inherited control? Is there any in code solution? Any help is greatly

UWP VisualStateManager PointerOver does not work

冷暖自知 提交于 2019-12-04 05:34:39
问题 I am mimicking the behavior of Groove Music, which displays a drop shadow effect when mouse hovers on an album cover (in my code it's the entire DataTemplate). But My VisualStateManager doesn't seem to work. Any ideas? I have implemented that programmatically but I want to use xaml to do that for practice. ---Update--- Changing Stackpanel to Grid still doesn't make things work. <GridView Grid.Row="1" Margin="10" IsItemClickEnabled="True" ItemsSource="{x:Bind Albums}"> <GridView.ItemTemplate>

UWP VisualStateManager PointerOver does not work

血红的双手。 提交于 2019-12-02 09:06:21
I am mimicking the behavior of Groove Music, which displays a drop shadow effect when mouse hovers on an album cover (in my code it's the entire DataTemplate). But My VisualStateManager doesn't seem to work. Any ideas? I have implemented that programmatically but I want to use xaml to do that for practice. ---Update--- Changing Stackpanel to Grid still doesn't make things work. <GridView Grid.Row="1" Margin="10" IsItemClickEnabled="True" ItemsSource="{x:Bind Albums}"> <GridView.ItemTemplate> <DataTemplate x:DataType="data:GridAlbumView"> <Grid Width="180" Height="240" Margin="10"> <Grid