How to put a white border to Black ellipse in windows phone 8

偶尔善良 提交于 2019-12-08 15:46:53

问题


I am using the above given popup in my windows phone 8 application. My issue is for the black color list item, it is not possible to differentiate the item from other items. So my question is how i can put a rounded white border to this particular black list item.

Here is the template what i am using in my application.

  <DataTemplate x:Key="ColorListTemplate">
    <Grid Height="70" Margin="0,0,0,5" toolkit:TiltEffect.IsTiltEnabled="True">
        <StackPanel Orientation="Horizontal">
            <Ellipse Height="52" Width="52" Fill="{Binding SelectedColor}"/>
            <TextBlock  Text="{Binding ColorName}" Margin="32,0" FontSize="34" Style="{StaticResource NormalText}"/>
            <CheckBox IsChecked="{Binding CheckedStatus}" Style="{StaticResource            CheckBoxStyle}" IsHitTestVisible="False"/>
        </StackPanel>
    </Grid>
</DataTemplate>

Anyone please help me to design my requirement.


回答1:


You could set a colored Stroke on the Ellipse elements to make it stand out on the black background.

Example:

 <Ellipse Height="52" Width="52" Fill="{Binding SelectedColor}" Stroke="White" StrokeThickness="1"/>


来源:https://stackoverflow.com/questions/18142218/how-to-put-a-white-border-to-black-ellipse-in-windows-phone-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!