.net 图像画笔无法使用windows phone 8.1
我的xaml代码.net 图像画笔无法使用windows phone 8.1,.net,xaml,windows-runtime,windows-phone-8.1,.net,Xaml,Windows Runtime,Windows Phone 8.1,我的xaml代码 <Grid Background="White"> <StackPanel Height="580" Margin="0,0,0,50" Orientation="Vertical"> <Image Height="70" Width="100" HorizontalAlignment="Center"/> <Image Height="50" Width="300" HorizontalA
<Grid Background="White">
<StackPanel Height="580" Margin="0,0,0,50" Orientation="Vertical">
<Image Height="70" Width="100" HorizontalAlignment="Center"/>
<Image Height="50" Width="300" HorizontalAlignment="Center"/>
<Ellipse x:Name="imgProfile" Height="180" Width="180" Visibility="Visible" >
<Ellipse.Fill>
<ImageBrush ImageSource="/IOB Wallet/Images/Profile/photo.png" Stretch="UniformToFill" />
</Ellipse.Fill>
</Ellipse>
<TextBlock Height="40" Text="Welcome Back !!!" Foreground="#06419D" FontSize="30" FontWeight="SemiBold" TextAlignment="Center" Margin="4"/>
<TextBlock Height="40" Text="" Foreground="Black" FontSize="28" FontWeight="SemiBold" TextAlignment="Center" Margin="4"/>
<TextBlock Height="30" Text="" Foreground="Black" FontSize="24" FontWeight="Normal" TextAlignment="Center" Margin="4"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="If you are Not ?" Foreground="Black" FontSize="15" HorizontalAlignment="Center" Margin="75,10,0,0"/>
<HyperlinkButton Content="Change User" Foreground="#06419D" FontSize="20" Margin="20,0,0,0"/>
</StackPanel>
<PasswordBox Height="40" PlaceholderText=" Password" BorderThickness="0 0 0 1" BorderBrush="#06419D" Margin="4,0,2,0"/>
<HyperlinkButton Foreground="#06419D" FontWeight="Light" Visibility="Visible" Content="Forgot Your Password ?" FontSize="20" HorizontalAlignment="Right" Width="234" />
</StackPanel>
<Button Content="LOGIN" Name="btnGetstarted" FontSize="26" FontWeight="Light" VerticalAlignment="Bottom" Foreground="White" Margin="1,0,0,-8" BorderThickness="0" Background="#06419D" Height="56" Width="500" Click="btnLogin_Click" />
图像在Xaml设计视图中是可访问的。运行/部署应用程序后,图像不会显示。我的照片实际尺寸为100*100。。
请提出解决方案
<Ellipse x:Name="imgProfile" Height="180" Width="180" Visibility="Visible" >
<Ellipse.Fill>
<ImageBrush ImageSource="ms-appx:///IOB Wallet/Images/Profile/photo.png" />
</Ellipse.Fill>
</Ellipse>
尝试此代码您应该尝试通过“属性”窗口设置背景。单击XAML代码中的
Ellipse
标记内部,然后按F4
键打开属性窗口。展开笔刷项目并选择“平铺笔刷”。通过下拉菜单选择ImageSource
尝试设置完整图像路径:ms-appx:///Assets/IOB 钱包/Images/Profile/photo.png或ms-appx:///IOB Wallet/Images/Profile/photo.png我不知道你的图像在哪里尝试了它。不起作用..尝试了..不起作用您是否检查了属性中的“构建操作”值?