【发布时间】:2016-01-28 13:48:13
【问题描述】:
我的 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" 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.. 请提出解决方案
【问题讨论】:
-
尝试设置完整的图片路径:ms-appx:///Assets/IOB Wallet/Images/Profile/photo.png 或 ms-appx:///IOB Wallet/Images/Profile/photo .png 我不知道你的图片在哪里
-
试过了。不工作..
-
试试
-
试过..不工作
标签: .net xaml windows-runtime windows-phone-8.1