I created a new blank windows universal app and dragged a PivotPanel on the empty page. When I take a look in the XAML-Editor it marks the PivotPanel line tells me the following:
Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)
Does anyone have a clue why this happens?
XAML-Code:
<Page
x:Class="App1.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App1"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<PivotPanel/>
</Grid>
</Page>
Related
I would like to create a comment tag to use in my XAML so I can comment it. (Why there is no ready built-in way to do this baffles me.)
The code snippet below fails to compile with the error:
*Error 'mc:Ignorable' is a duplicate attribute name. Line 9, position 7. TriCoordinate Math*
Any help would be appreciated.
<Page x:Class="TriCoordinate_Math.Views.GraphingPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:Comment="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Style="{StaticResource PageStyle}"
mc:Ignorable="Comment"
mc:Ignorable="d">
Found this in another question:
It works quite well. Much better than the dumb default mechanism which must be placed outside the tag entirely. (which is largely useless and often very confusing)
<UserControl xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:comment="Tag to add comments"
mc:Ignorable="d comment" d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<Button Width="100"
comment:Width="example comment on Width, will be ignored......">
</Button>
</Grid>
</UserControl>
This implementaton of this method compiles correctly and is exactly what I was looking for.
<Page x:Class="TriCoordinate_Math.Views.GraphingPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:Comment="Tag used for commenting"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Style="{StaticResource PageStyle}"
mc:Ignorable="d Comment">
<Grid x:Name="ContentArea"
Margin="0"
Loaded="ContentArea_Loaded">
<Grid Background="{ThemeResource CustomAcrylicGraphingBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="40" Comment:Row0="application header"/>
<RowDefinition Height="1*" Comment:Row1="application body"/>
<RowDefinition Height="40" Comment:Row2="application footer"/>
</Grid.RowDefinitions>
Could be a user control completely transparent?
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
mc:Ignorable="d"
x:Class="MainWindow.UserControl3"
Width="600" Height="600">
<Grid x:Name="LayoutRoot" Background="Transparent"/>
</UserControl>
if I execute the previous code the result is a black window, not transparent why?
Thanks
i'm trying to implement windows store application with transparent background.
in my xaml i wrote:
<Page
x:Class="App4.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App4"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" Background="Transparent">
but the background is black
Did you try adding Opacity within your Grid?
<Grid>
<Grid.Background>
<SolidColorBrush Color="Black" Opacity="0.5"/>
</Grid.Background>
</Grid>
Reference: How do you override the opacity of a parent control in WPF?
My form contents are displayed in a Grid inside of a Scrollview on a page.
<phone:PhoneApplicationPage
x:Class="DS.Mobile.Pages.FormAppPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
>
<ScrollViewer >
<Grid x:Name="_canvas" Background="Gainsboro">
</Grid>
</ScrollViewer>
</phone:PhoneApplicationPage>
Normally the content can be viewed without any scrolling action, but windows provides a dramatic over scrolling behavior anyway if you drag across the screen surface. How do you prevent this over scroll behavior?
I am Using silverlight4 I have developed one page when I navigate to this page from Other Silverlight Page the Position is at the bottom of the page .I need to set the Focus on top of the silverlight Page.I am not using ScrollViewer on my Page.
Open MainPage.xaml file and replace the code with the following.
<UserControl xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" x:Class="ScrollViewerControl.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<ScrollViewer Height="300" Width="300" Name="scrollViewer1"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto">
<ScrollViewer.Content>
<StackPanel>
' Content Here
</StackPanel>
</ScrollViewer.Content>
</ScrollViewer>
</Grid>
</UserControl>
set the ScollViewer offset to zero like
scrollViewer1.ScrollToVerticalOffset(0);
then your vertical scroll will always be on Top.