xaml Questions

10

Solved

I'm programming by WPF. I need a way to make center content of cells, in DataGrid control. I use this code also: <DataGrid x:Name="dg1" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAl...
Sharell asked 11/8, 2013 at 22:2

9

Solved

I have a textblock: <TextBlock HorizontalAlignment="Left" Name="StatusText" Margin="0,20" TextWrapping="Wrap" Text="{Binding StatusText}"> ... Status ... </TextBlock> codebehind: p...
Unattended asked 27/8, 2014 at 8:20

4

Solved

In .NET MAUI, a ContentPage doesn't have the BarBackgroundColor property, unlike the NavigationPage and TabbedPage. Is there another way to change the nav bar colour, such as a property in the Styl...
Klepac asked 22/12, 2022 at 15:46

7

Solved

I'm developing a Windows Store App using C# + XAML. When I add a TextBox with the property TextWrapping set to NoWrap, a "X" appears at the end of the TextBox when it's focused. So, I need to re...
Uteutensil asked 26/2, 2013 at 18:17

3

Solved

I often bind the IsExpanded and IsSelected properties of a TreeViewItem to my viewmodel. This for example makes it possible to make an item pre-expanded when the tree is loaded or expand an item wh...
Binominal asked 19/1, 2015 at 14:58

23

I have a Button that closes my window when it's clicked: <Button x:Name="buttonOk" IsCancel="True">Ok</Button> That's fine until I add a Command to the Button i.e. <Button x:Name...
Naylor asked 7/12, 2010 at 12:18

2

Solved

I was wondering if it is possible to hide a control on a view if the property to which the control is bound does not exist in the view model. For example, if I have the following: <CheckBox Con...
Householder asked 27/3, 2012 at 16:36

12

Solved

I am trying to format a textblock which is bound to a TimeSpan property. It works if the property is of type DateTime but it fails if it is a TimeSpan. I can get it done using a converter. But I am...
Angloirish asked 30/12, 2010 at 13:47

9

Solved

I am getting error like "Type reference cannot find public type named 'Sign'" in xaml. how can i resolve it. the Sign class is in the same assembly. <DataTemplate DataType="{x:Type local:Sign}"...
Rebroadcast asked 4/5, 2012 at 5:27

3

I am using the MaterialDesign for XAML package in WPF. When I run my application, all styles and controls are rendered as expected. However in the XAML designer I have dozes of errors such as "The ...
Merit asked 5/8, 2019 at 21:26

3

Solved

I'm trying to find a way to initiate the close of an active DialogHost from code, but have been unable to find the right syntax. I think the main challenge is accessing the DialogHost from a class ...
Ence asked 1/6, 2018 at 23:24

5

I have a SharpDX project that is very near completion. It uses a Kinect for interaction. Because of this my project uses WPF both for the Kinect region and the KinectUserViewer object. SharpDX has ...
Riparian asked 12/1, 2015 at 1:16

10

Solved

How can I do this in XAML: PSEUDO-CODE: <TextBox Text="{Binding Password}" Type="Password"/> so that the user sees stars or dots when he is typing in the password. I've tried various exa...
Eartha asked 13/7, 2009 at 13:58

2

Solved

I have a weird scenario involving overriding default styles in WPF and having them apply to subclasses. Is this not possible? For example, I have the following code: <Window x:Class="TestWPFSty...
Scrapple asked 21/5, 2013 at 18:57

4

Solved

In Xamarin.Forms, how do I set FontAttributes within XAML to both Bold and Italic? Example: <Style TargetType="Label"> <Setter Property="FontAttributes" Value="Bold" /> <Setter ...
Maighdiln asked 14/7, 2015 at 9:58

6

While using WPF I noticed that when I add a control to a XAML file, the default constructor is called. Is there a way to call a parameterized constructor?
Nena asked 4/7, 2009 at 23:21

5

Solved

SignInWindow signIn= new SignInWindow(); signIn.ShowDialog(); The above code is in my MainWindow class. When the new Window is shown, I want the current window to close. Whats the best way to do...
Stulin asked 8/10, 2013 at 13:19

3

Solved

Goodmorning developers, I am trying to make a delete function in powershell. I want to have something like this: function deleteEnv(){ $result = [System.Windows.Forms.MessageBox]::Show('Are you...
Bent asked 16/12, 2016 at 8:8

3

Solved

I have a ScrollViewer and in that I am showing the Vertical Scrollbar, Now on changing resolution of the system I want to get the width of the scrollbar. I went through One StackOverflow Post there...
Gallant asked 18/4, 2011 at 10:48

6

I have been working on a WPF application using vb.net and I've recently run into a problem. When I build my code, the build is successful but when it comes to running the code the System.IO.IOexce...
Seminal asked 21/3, 2013 at 9:24

2

Solved

I have quite a huge WPF application with a lot of XAML files. Every single XAML file has from 5 to 10 clr to xml namespace mappings xmlns:abc="clr-namespace:Abcdef". It looks awful and is a pain to...
Despatch asked 27/10, 2011 at 6:55

4

Solved

I want a ComboBox which has no drop-down button but can still be opened when I click on the text in the ComboBox. Is this possible with a WPF ComboBox?
Varletry asked 3/9, 2009 at 13:11

5

Solved

I want to create a menu bar identical to the one in windows forms in my WPF application. How would I do this? The menu option in the WPF controls toolbox only gives a blank bar.
Nelan asked 30/3, 2012 at 3:54

3

Solved

Let's say we show some WPF Window and comes moment when we have to show some extra panel at the bottom. What I want to do is to increase WPF Window size and center it again. Any clue or samples? ...
Idiopathy asked 25/1, 2012 at 13:6

2

Solved

I have the following <CollectionView Margin="5" ItemsSource="{Binding Subjects}"> <CollectionView.ItemsLayout> <GridItemsLayout Orientation="Vertical"...
Guanabara asked 30/1, 2023 at 10:49

© 2022 - 2025 — McMap. All rights reserved.