Posts

Showing posts with the label XAML

UWP: Better use XAML's RichTextBlock than a TextBox for neat rendering of text?

Image
I wanted to disaply in my app a somewhat large amount of text contained in three paragaphs. Using a textbox with wrapping and scrolling did show all the text. However, as displayed text it was not satisfactory. Using 'paragraphs' inside 'RichTextBlock' provided the best option. The XAML code shows a TextBox and a RichTextBlock with three ' Paragraph ' controls. Both of them inside a ' ScrollViewer ' which makes it easy to scroll the text as shown. Here is the code for the MainPage.XAML This is the result rendered in the Local Machine. This one rendered to an emulator (4")

UWP: XAML's ComboBox Control -Part 1

Image
Microsoft's Universal Windows Framework apps are well supported by Microsoft and you could use it for not only Windows but for other devices as well. You can also use UWP for cross-platform use. In the Universal Windows Platform (UWP) projects there is an advantage of one code that works on different device families (phone, tablet, desktop etc.). However, the UWP projects depend on using XAML.  ComboBox details can be seen in the Object Explorer of Visual Studio 2017 Community used in writing this post. In this post, I will show you how you may work with this controls for a UWP project. Getting the ComboBox Control Placing ComboBox on the Design area Adding ComboBoxItems We start with a Windows Universal blank C# project with the name JComboBox as shown. You will be asked for what target and minimum versions of Windows 10 that you want. The higher the version the more feature support. The Build version 16299 is chosen for both as shown i...

XAML ListView Control for Universal Windows Apps

Image
I have posted a number of articles related to ListBlock , ListView etc that you can use in HTML 5, web applications using Intel's XDK. Intel XDK's development platform for several frameworks were discontinued and Intel's effort is in the realm of Internet of Things devices and related applications. Microsoft's Universal Windows Framework apps are well supported by Microsoft and you could use it for not only Windows but for other devices as well. In the Universal Windows Platform (UWP) projects there is an advantage of one code that works on different device families (phone, tablet, desktop etc.). However, the UWP projects depend on using XAML. For example the 'List' related controls in UWP are as shown here: In this post, I will show you how you may work with this controls for a UWP project. Getting the ListView Control Placing ListView on the Design area Adding Textbox Controls to ListView Making changes to XAML Code We start with a W...

Event Code: UI design with XAML in Visual Studio 2017 - 2

Image
I assume you have followed me with this post here: http://hodentekhelp.blogspot.com/2017/12/how-do-i-configure-button-in-xaml.html After reading the above you will see that you start with an empty project whose code is shown here: WinPhoneStep1 In the final step you will have achieved this: WinPhoneStep11 This project when deployed will just show a button as in the above and nothing more: WinPhoneStep13 Writing code for a click event of this button. Let us first give a name for this button, like ClickMe . When you highlight the button in the design by clicking it, the Property pane opens where you can write the name you want as shown. winPhoneStep20 In the XAML code the Button gets a qualifier x:Name="ClickMe" as shown here: Now enter the Click event to the code by just enter "cl" after a space as shown and the intellisense kicks-in showing your options as shown. winPhoneStep22.png You pi...