File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Shadows Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 4141 Opacity="@[Opacity:DoubleSlider:1.0:0.0-1.0]"/>
4242 </ui:Effects.Shadow>
4343 </Rectangle>
44- <Border CornerRadius="32"
45- Height="100" Width="100"
46- BorderBrush="White" BorderThickness="1">
47- <Border.Background>
48- <ImageBrush ImageSource="ms-appx:///Assets/Photos/Owl.jpg"/>
49- </Border.Background>
50- <!-- TODO: Doesn't work? -->
44+ <!-- If you want to apply a shadow directly in your visual tree to an untemplated element
45+ You need to at least have a layer of depth as seen in this next example. -->
46+ <Border Height="100" Width="100">
47+ <Border CornerRadius="32"
48+ BorderBrush="White" BorderThickness="1">
49+ <Border.Background>
50+ <ImageBrush ImageSource="ms-appx:///Assets/Photos/Owl.jpg"/>
51+ </Border.Background>
52+ </Border>
53+ <!-- We need to put the Shadow on a parent element here as otherwise the
54+ rounding of the border of the image above clips the shadow itself -->
55+ <!-- TODO: This specific scenario should be simpler in the Composition based one? -->
5156 <ui:Effects.Shadow>
5257 <media:AttachedCardShadow CornerRadius="32"
5358 Offset="4,4"/>
You can’t perform that action at this time.
0 commit comments