Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Triangular error sample code XAML user control.

$
0
0

I have a compound button - image with text as a user control- just based on the  beginners sample at  http://wpftutorial.net/WPFIntroduction.html.

When I drag the user control to the mainWindow/xaml is see a faint hashed box around the control but I do see the image and a strange triangular warning button. When compiledthe image disappears from the button and the warning is gone too and the hashed ( faint orange colored ).

Are these hash marks and the warning icon related ?  What can be done to fix this ?what does the yellow caution sign mean ?

My xaml  looks like this:

<UserControl x:Class="WpfTestForControls.ButtonWImage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             d:DesignHeight="100" d:DesignWidth="300">
    <Grid>
        <Grid Margin="0,0,10,0">
            <Button Margin="20,20,20,20">
                <StackPanel Orientation="Horizontal" Height="54">
                    <Image Source="xportdrive.jpg" Stretch="Uniform" Height="71" Width="117"/>
                    <TextBlock x:Name="btnDeepArchive" HorizontalAlignment="Center" VerticalAlignment="Center"><Run Text="Deep"/><Run Text=" "/><Run FontSize="14" Text="Archive "/><Run Text="Now"/></TextBlock>
                </StackPanel>
            </Button>
        </Grid>
    </Grid>
</UserControl>


andrew


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>