xaml

WPF Datepicker Calendar buttons not working (Using modified template)

流过昼夜 提交于 2021-01-27 21:27:47
问题 I apologize in advance if this is already out there (I did an advanced search and couldn't find this specific issue.) I'm using a custom WPF Datepicker calendar template (Just changing colors really), but now my buttons don't work. It will pop up the calendar, but nothing works from that point, Am i missing anything? Here's the code below: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls

Xamarin forms Add button in TabbedPage

会有一股神秘感。 提交于 2021-01-27 20:34:17
问题 I have a question. I created the following TabbedPage: <?xml version="1.0" encoding="utf-8" ?> <TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:d="http://xamarin.com/schemas/2014/forms/design" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:views="clr-namespace:MyApp.Views" mc:Ignorable="d" x:Class="MyApp.Views.MainPage" xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration

Open a hyperlink URI (www.google.com) in a web browser( IE or chrome) through code in C# WPF forms

北城余情 提交于 2021-01-27 17:50:29
问题 Im working on a project which has hyperlinks in it. I used DataGridHyperlinkColumn to populate the URI's in a single column. Whenever I click on a URI, it gets opened in both browser and the wpf window. I could prevent the URI opening in web browser by using hyperlink.RequestNavigate(). but I need the URI to be opened only in web browser and not in the WPF window. I have attached my XAML and C# code below. <DataGrid Name="dgUsers" AutoGenerateColumns="False" CanUserAddRows="False"

How does WPF determine what property to set when setting the content of elements in XAML?

一个人想着一个人 提交于 2021-01-27 14:16:57
问题 I hope my title is clear.... What I mean is for exmaple when we define animation: Xaml: <StoryBoard> <DoubleAnimation..../> </StoryBoard> But if we defines same thing in code-behind, we could do: DoubleAnimation myDAnimation = new DoubleAnimation(); ..... StoryBoard myStoryBoard = new StoryBoard(); myStoryBoard.Children.Add(myDAnimation); I tried to look into StoryBoard's class definition, nothing special: public sealed class Storyboard : Timeline { public Storyboard(); // Summary: // Gets

Populate a DataGrid using ViewModel via a database

被刻印的时光 ゝ 提交于 2021-01-27 12:51:01
问题 Basically, I have a 4 files that I'm dealing with: DBDisplay.xaml DBDisplay.xaml.cs DBDisplayViewModel.cs DBConn.cs In my ViewModel I am trying to populate the following DataGrid from my .xaml file: <DataGrid ItemsSource="{Binding Path=Users}"/> With the following code: public class DBDisplayViewModel { public ICollectionView Users { get; set; } DBConn dbCon; // the connection object DataSet dataSet; DataRow dataRow; private void Load() { string connectionString = Properties.Settings.Default

Deciphering which control fired an event

点点圈 提交于 2021-01-27 12:39:38
问题 I have an application with many images that all look the same and perform similar tasks: <Image Grid.Column="1" Grid.Row="0" Name="image_prog1_slot0" Stretch="Uniform" Source="bullet-icon.png" StretchDirection="Both" MouseDown="image_prog1_slot0_MouseDown"/> <Image Grid.Column="1" Grid.Row="1" Name="image_prog1_slot1" Stretch="Uniform" Source="bullet-icon.png" StretchDirection="Both" /> <Image Grid.Column="1" Grid.Row="2" Name="image_prog1_slot2" Stretch="Uniform" Source="bullet-icon.png"

Deciphering which control fired an event

孤街浪徒 提交于 2021-01-27 12:34:16
问题 I have an application with many images that all look the same and perform similar tasks: <Image Grid.Column="1" Grid.Row="0" Name="image_prog1_slot0" Stretch="Uniform" Source="bullet-icon.png" StretchDirection="Both" MouseDown="image_prog1_slot0_MouseDown"/> <Image Grid.Column="1" Grid.Row="1" Name="image_prog1_slot1" Stretch="Uniform" Source="bullet-icon.png" StretchDirection="Both" /> <Image Grid.Column="1" Grid.Row="2" Name="image_prog1_slot2" Stretch="Uniform" Source="bullet-icon.png"

In WPF animation set property BeginTime to a static resource

妖精的绣舞 提交于 2021-01-27 11:45:12
问题 What I want to do is define all the BeginTimes of my Animation using a resource. For example, I want: <sys:TimeSpan x:key="SomeResource">... </sys:TimeSpan> ... <DoubleAnimation BeginTime={StaticResource SomeResource}/> Obviously sys:TimeSpan is not the correct type to use. How do I define my resource so I can reference it as a resource when defining my animations? I also want to do this purely in XAML. Thanks. 回答1: System.TimeSpan is the correct type to use since is this is the type of

In WPF animation set property BeginTime to a static resource

亡梦爱人 提交于 2021-01-27 11:40:44
问题 What I want to do is define all the BeginTimes of my Animation using a resource. For example, I want: <sys:TimeSpan x:key="SomeResource">... </sys:TimeSpan> ... <DoubleAnimation BeginTime={StaticResource SomeResource}/> Obviously sys:TimeSpan is not the correct type to use. How do I define my resource so I can reference it as a resource when defining my animations? I also want to do this purely in XAML. Thanks. 回答1: System.TimeSpan is the correct type to use since is this is the type of

Xamarin Forms : How to fix Activity Indicator in Centre of Screen in Scrollview

老子叫甜甜 提交于 2021-01-27 07:03:51
问题 I have a ScrollView over AbsoluteLayout .. I need to Fix the postion of the ActivityIndicator in centre of screen. I tried following code. <ScrollView> <AbsoluteLayout VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"> <StackLayout BackgroundColor="White" Padding="50,20,50,20" Spacing="5" AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All"> // have set of elements.. </StackLayout> <ActivityIndicator IsVisible="{Binding IsBusy}" IsRunning="{Binding IsBusy}"