xaml

Is there a way to disable Auto Capitalisation on Xamarin Forms 'Entry' XAML

為{幸葍}努か 提交于 2020-06-13 19:30:04
问题 I have just started working in Xamarin and am writing an App targeting iOS and Android. I'm trying to keep pretty much all of my UI design in the common library between them and am starting to find the lines a bit blurred. My current requirement is to disable the auto-capitalisation on the 'Entry' tag object in XAML. Is this something that can be done by markup? I cannot find any property that would support this behaviour. If not, what should I do instead? 回答1: If you plan to use this

How to work with RichTextBox in WPF

断了今生、忘了曾经 提交于 2020-06-13 10:05:14
问题 I have a WPF application in which I want to convert a TextBox into a RichTextBox. I have already written the following lines of code: <RichTextBox> <FlowDocument> <Paragraph> <Run Text="{Binding GeneralDescription}" /> </Paragraph> </FlowDocument> </RichTextBox> This has the effect that the string GeneralDescription is displayed and I can edit and format it. Now I have the problem that when I mark a part of the text, format it (e.g. make it bold), save the document and re-open the document,

Change the button default highlighted colour to transparent on mouseover XAML wpf?

不问归期 提交于 2020-06-12 07:20:37
问题 I have a button with transparent background. When i move mouse over on the button, a light blue colour appears on the button(Default Colour) obviously. what i want is that my button background should remain transparent even when the mouse is over the button. How can i do it in XAML? i have searched it but couldn't find anything related to my problem. Almost Every Example or walkthrough is for changing styles and templates of the button. XAML Code: <Button HorizontalAlignment="Left" Margin=

Xamarin Forms Collapsable StackLayout

自作多情 提交于 2020-06-12 06:11:28
问题 I'm trying to implement a kind of collapsable StackLayout. Every tine the user clicks the button, it expands or collapse the stacklayout to show/hide more details. I was able to achieve more/less this with the code below, but it doesn't look right and the effect isn't great, because it grows immediately and I'm applying the effect to other element. Do you have any suggestions to do this, I'm using xamarin Forms? XAML <?xml version="1.0" encoding="utf-8" ?> <StackLayout xmlns="http://xamarin

WPF MVVM Textbox Validation

心不动则不痛 提交于 2020-06-09 18:21:19
问题 I'm creating a WPF application using MVVM. I have a textbox, which is bound to a property in my ViewModel of type double with a default value of 0.0. If I now enter a text value (say, abc) in the textbox, upon losing focus, the textbox is highlighted indicating an incorrect value. However, the user can still go ahead and click on Submit to invoke a ViewModel command. As the Text property of the textbox is bound to a property of type double in the ViewModel, the ViewModel property contains the

WPF MVVM Textbox Validation

天涯浪子 提交于 2020-06-09 18:19:16
问题 I'm creating a WPF application using MVVM. I have a textbox, which is bound to a property in my ViewModel of type double with a default value of 0.0. If I now enter a text value (say, abc) in the textbox, upon losing focus, the textbox is highlighted indicating an incorrect value. However, the user can still go ahead and click on Submit to invoke a ViewModel command. As the Text property of the textbox is bound to a property of type double in the ViewModel, the ViewModel property contains the

Meaning of x:Key, x:Name, x:Type, x:Static in XAML [closed]

爷,独闯天下 提交于 2020-06-07 21:30:26
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 years ago . On the msdn site there is big article: XAML overview And there is the part describing what is: x:Key, x:Class, x:Name etc. but the problem is that all that said there about it is very abstractional with no examples. I know that when I create an element in xaml and set: x:Name = "abc" then in the cs

How do I toggle between pages in a WPF application?

懵懂的女人 提交于 2020-06-01 10:25:48
问题 I am trying to create a WPF application that presents a login view and after successful login, presents a first, second, and third page (like a wizard). Each "page" including the login view has its respective ViewModel . I have a MainWindow.xaml which holds four UserControls one of which will be visible at any given state. I am having trouble dealing with the orchestration of visibility. It makes the most sense to me that MainWindowViewModel is the one that is responsible for keeping track of

Why ui update when binding ItemsSource in xaml but doesn't when assigning it in code?

半世苍凉 提交于 2020-06-01 07:45:06
问题 I am trying to bind a combobox having a DataTemplate to a list of classes generated by a static methode Populate() . When assigning combo1.ItemsSource = Peoplelist; code-behinde, combobox items in ui are updating, but when I do a binding in xaml: ItemsSource="{Binding Path=Peoplelist}" it is not. What I am missing? MainWindow.xaml.cs using System; using System.Collections.Generic; using System.Windows; namespace WpfTest { public partial class MainWindow : Window { public List<People>

ActiveX in WPF MVVM Light application

那年仲夏 提交于 2020-06-01 07:40:38
问题 I am new to C# WPF programming and working on a WPF-Application that has to include a legacy ActiveX component. I know ActiveX is kind of dead but I have to use it in this case unfortunately. I use MVVM Light with an IFrameNavigationService as shown in this post. Furthermore I used this example to bind the ActiveX component into the view to follow the guidlines of MVVM which is probalby not the best way in my opinion. On each navigation I have to wait until page is loaded to connect with the