xaml

How to force a Windows 10 uwp webview app to load a url after suspend / resuming & auto reload when timing out

て烟熏妆下的殇ゞ 提交于 2021-02-10 16:07:47
问题 This (simplified) c# / XAML UWP Webview app displays a blank page after the app is resumed after about 90+ sec. when displaying a local security cam video stream webpage. It appears to timeout after about 90 sec while the app is being suspended and then upon resuming the webview page is blank. To give the sample code below something to display, I randomly picked a site from a web search and landed on http://www.porttampawebcam.com/. The few youtube and webcam pages I've tried didn't reproduce

How do I remove the white lines beside each TabItem?

夙愿已清 提交于 2021-02-10 14:44:18
问题 I've recently taken to learning WPF for a project. I've been styling a TabControl to fit the colors of a component library I'm using, but these strange white lines have appeared beside each TabItem , but only between items or before the first item. What are they, and how can I get rid of them? I tried using the inspector provided in Visual Studio but they aren't selectable, which leads me to believe they are some internal part of TabItem , but I'm stuck at this point. Usage: <TabControl Grid

How do I remove the white lines beside each TabItem?

≡放荡痞女 提交于 2021-02-10 14:42:14
问题 I've recently taken to learning WPF for a project. I've been styling a TabControl to fit the colors of a component library I'm using, but these strange white lines have appeared beside each TabItem , but only between items or before the first item. What are they, and how can I get rid of them? I tried using the inspector provided in Visual Studio but they aren't selectable, which leads me to believe they are some internal part of TabItem , but I'm stuck at this point. Usage: <TabControl Grid

Costumize style of the selected (current) FlyoutItem

浪子不回头ぞ 提交于 2021-02-10 14:39:26
问题 I've noticed that when I customize flyout item appearance like it says here in the docs, the current FlyoutItem is not marked anymore. Snip of the code from docs to change the item appearance: <Shell ...> ... <Shell.ItemTemplate> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="0.2*" /> <ColumnDefinition Width="0.8*" /> </Grid.ColumnDefinitions> <Image Source="{Binding FlyoutIcon}" Margin="5" HeightRequest="45" /> <Label Grid.Column="1" Text="{Binding Title}"

Bind properties to elements inside a Listview DataTemplate

空扰寡人 提交于 2021-02-10 06:22:06
问题 I can't get databinding to work within a DataTemplate in Xamarin forms. I can get it to work with the ListView (i.e. binding the RowHeight ), but once in the DataTemplate , setting things to a property of my ViewModel has no affect. In the below example, if I set the ColumnDefinition.Width to a property, it is completely ignored, but setting it to a hard value works fine. I have put in a label to see what the property value is and it turns out blank when inside the Datatemplate , and I have

What is the order of setting properties in XAML?

落爺英雄遲暮 提交于 2021-02-10 06:15:21
问题 I have a TextBlock with two properties ( Text and Foreground ) bound to the same ViewModel property. Both also have converters. One of the converters checks the Text property and returns a 'dash' if the value is NaN . The other checks that the value is above, below or equals zero and accordingly sets the foreground to different colors. XAML example: <TextBlock> <TextBlock.Text> <Binding Path="AvgDistance" StringFormat="{}{0:N1}" Converter="{x:Static converter:ValueToDash.Instance}"/> <

Referencing enum defined in a class from within XAML

天涯浪子 提交于 2021-02-10 06:15:17
问题 In Expression Blend 4 (Silverlight project) I have a UserControl to which I have added a CLR property. This property is an enum type, which is defined within the UC. I have attached a ChangePropertyAction behaviour to an instance of the UC. However, the XAML parser gives the following error (among others): '+' is not valid in a name This is because the following XAML (snippet) has been generated: <local:SomeControl Margin="155,113,317,0" d:LayoutOverrides="Width, Height"> <i:Interaction

Xamarin. The name 'authorEntry does not exist in the current context

懵懂的女人 提交于 2021-02-10 04:49:16
问题 I'm new in Xamarin. I want to add information to Book class then display information using displayalert() method and its worked. But Why got an error? Hope you guys can help me solve this problem.Thank you in advance. NewBookPage.xaml <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Form.NewBookPage"> <StackLayout Margin="10,10,10,0"> <Entry x:Name="nameEntry" Placeholder="name of

Xamarin. The name 'authorEntry does not exist in the current context

馋奶兔 提交于 2021-02-10 04:47:39
问题 I'm new in Xamarin. I want to add information to Book class then display information using displayalert() method and its worked. But Why got an error? Hope you guys can help me solve this problem.Thank you in advance. NewBookPage.xaml <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Form.NewBookPage"> <StackLayout Margin="10,10,10,0"> <Entry x:Name="nameEntry" Placeholder="name of

Make dependency object properties bindable as a static resource?

混江龙づ霸主 提交于 2021-02-08 21:00:42
问题 How to make an array of dependency object properties bindable for later binding as a static resource? The code I have now, it seems that my DependencyObject bypasses the dependency property system... I have the following class: public class ValueMarker : DependencyObject { public static readonly DependencyProperty BrushProperty = DependencyProperty.Register("Brush", typeof(Brush), typeof(ValueMarker), new FrameworkPropertyMetadata(Brushes.Aqua)); public static readonly DependencyProperty