Questions tagged [xaml]

Extensible Application Markup Language (XAML) is a declarative XML-based language used for initializing structured values and objects in various frameworks. When a question is about the usage of XAML with a specific framework a tag for the framework should also be provided e.g. [wpf] (Windows Presentation Foundation), [silverlight], [windows-phone], [windows-store-apps] (Windows 8 store apps), [win-universal-app], [xamarin.forms] or [workflow-foundation]

0
votes
0answers
3 views

How export xaml view using costura and mef at the same time?

I'm trying to build single exe wpf app with costura and have next error: No exports were found that match the constraint: ContractName WpfClient.Views.ShellView RequiredTypeIdentity ...
0
votes
1answer
23 views

Two-way link to the properties of all SelectedItems of a ListView?

I have a ListView bound to an ObservableCollection of objects. Next to that I have a bunch of TextBoxes and ComboBoxes that are TwoWay bound to the properties of the SelectedItem of that ListView. The ...
0
votes
0answers
32 views

xaml - How to specify which ContentTemplateSelector to use?

I've seen a ton of examples where a content control's ContentTemplateSelector property is assigned a StaticResource. Example: <ContentControl Content="{Binding}" ContentTemplateSelector="{...
0
votes
0answers
22 views

C# UWP XAML :Layout cycle detected. Layout could not complete. Layout cycle detected. Layout could not complete

I know there are some questions with same head line, but I couldn't find any answer that worked for me. Got in Xml file triple ListBox , which was built from 3 inner Observable collection. (List of ...
0
votes
1answer
13 views

Xamarin Forms Carousel view issue with binding

Hello I’m having an issue with binding a list of string to my Carousel View First I have a list of an object I get from my server public class PostObject { public string PostOwner { get; ...
0
votes
0answers
21 views

How to use an external class on the files .xaml.cs?

I have a question. I'm working in a UWP application and i don't know how to instance another class (external class named GestionBras.cs) on my mainpage.xaml.cs. i use the GestionBras.cs class on both ...
-1
votes
0answers
5 views

Change the fill color of a rectangel based on the value of a textbox

I have a rectangle and I want to change the fill color based on the value of a tekstbox For the moment i can change the coloy when i give the color in the tekstbox. When I enter ...
0
votes
0answers
12 views

In Xamarin forms, How can you make selected option in picker not visible in other pickers?

I have 7 similar pickers with same options. Right now user can select the same option from picker1 that it's already been selected in picker2. I want if user selected in picker not visible in ...
0
votes
0answers
8 views

How to add wms layer in arcgis silverlight application?

We need to use wms service to display the data in the map. I referred the websites given below. https://community.esri.com/thread/69289 http://resources.arcgis.com/en/help/runtime-wpf/concepts/index....
0
votes
1answer
27 views

How can I add some images as drop down in combo box?

I have some quick icons which make my software easy to use. But now as per my client requirements, I need to make these icons a Dropdown. Does anyone have some idea how to do this? I have tried ...
0
votes
0answers
12 views

Need Fix: Cannot open modal from button inside a Custom control inside Listview-DataTemplate-ViewCell

I have a weird issue, but it maybe because I don't understand. I created 2 Custom controls. [Custom Control A] has a button named [LAUNCH] that launches a modal. [Custom Control B] has no buttons but ...
0
votes
1answer
21 views

Custom control and additional style in generic.xaml for it

I have created custom control and a default style for it. My XAML is simple: <Style TargetType="{x:Type local:MyControl}"> <Setter Property="Template"> <Setter.Value> ...
0
votes
1answer
43 views

How can I update a WPF Combobox when the drop down is closed on another Combobox?

I have recently started to pick up some C# as the business had a requirement for some executables that will run pre-defined sets of PowerShell commands. I know... It is not the module I am using, but ...
1
vote
0answers
27 views

Integrating XAML apps in Unity projects

I've been developing a Unity3D project with Hololens using the Mixed Reality Toolkit, running smoothly with now problems. I'm trying now to create a Single-SignOn capability in the project - a Web ...
1
vote
0answers
51 views

How can I solve my problem of receiving data via a socket?

I am currently modernizing an HMI for this I use the platform UWP proposed by Microsoft. The old version of the HMI was developed in C++ but for new needs, it is now developed in C# / XAML. I take ...
0
votes
1answer
14 views

System.TypeInitializationException Xamarin CarouselView

The type initializer for 'Xamarin.Forms.ItemsView' threw an exception. After click button. Unhandled Exception: System.TypeInitializationException: The type initializer for 'Xamarin.Forms.ItemsView' ...
1
vote
1answer
39 views

Why are my custom controls not always receiving MouseEnter events?

Alright, I'm fairly new to WPF and I ran into a very strange problem. The relevant section of my XAML defines a Border around a ScrollViewer around a StackPanel which is populated using an ...
0
votes
0answers
35 views

setting a different binding data context for different windows

I have a window with some controls where some controls open up other windows with different controls. The bindings in the first window work great, and what's weird is the bindings in one of the new ...
0
votes
1answer
14 views

Can we tab on TabIndex only without TabStop

I have an UI who have a lot of object. I want my tab to circle between some object. With KeyboardNavigation.TabIndex="0" But i don't want to stop on some object without TabIndex. I know i can ...
0
votes
0answers
25 views

Window unable to be dragged to other monitor while maximized

My WPF generated window, once maximized, can't be moved to another window unless it's un maximized first. I've basically removed (and added back) every element in the window properties to see if it ...
2
votes
1answer
40 views

How can i centred a popup on my window in XAML?

i want to have a centred popup notifications on my window ( Height="400" Width="500"). See the xaml code below. Is it possible to center it only with xaml (without the code behind)? ...
0
votes
1answer
19 views

Xaml layout, box to the left corner over another box

I am trying to get to this layout. I got the red part correct but I am not able to position green box on top of the left part of the red box. Green box needs to have same width as left part of the ...
0
votes
0answers
26 views

Short way to set UserControl as DependencyProperty

A way to shorten the record of the code below. <local:MyUserControl> <local:MyUserControl.MyDependencyProperty> <local:MyOtherUserControl> </local:MyUserControl....
0
votes
1answer
16 views

How to navigate items between several GridViews in a ListView using Xbox controller?

I'm running uwp on xbox, but have some problems on handling the navigation using Dpad or Left stick. My situation is like this: A ListView, which contains many GridViews. Each GridView is one row ...
0
votes
1answer
22 views

Put one grid bigger without chaging the size of other grid

I have two grids of same size but I want put one of them bigger and when I change the size of the Row the other grid gets smaller. Im maybe not understading who grids works but the last Row with ...
-3
votes
0answers
25 views

How to bind a ObservableCollection<> of custom class to property grid

Class TreeData { public string Header{get;set;} public ObservableCollection<TreeData> Children { get;set; } } We have ObservableCollection treeView. How to bind it to Xceed ...
0
votes
1answer
33 views

I want to change the line color using 'button trigger' in a specific condition

I want to change the color of line1 and line2 like below. How can I bind a variable in c# code? Is there a good solution to resolve the code below? xaml code <ControlTemplate TargetType="...
-1
votes
1answer
23 views

How to iterate collection in XAML, where the collection is part of the model in c# class

I am building desktop application using WPF and XAML with MVVM pattern. I have a collection of strings ( error messages) in the model class. Class is binded to the XAML. I need to iterate the ...
0
votes
1answer
28 views

Allow vertical scrolling of outer ScrollViewer inside inner horizontal-scrolling ScrollViewer

When you have a ScrollViewer within a ScrollViewer, scrolling with the scroll wheel is limited to the inner one. That makes sense when they have the same "orientation". But when the outer allows only ...
-3
votes
0answers
20 views

How to use datasnapshot of firebase database in xamarin forms? [on hold]

Please tell me how do i implement datasnapshot of firebase database in xamarin forms? I am unable to find in xamarin community.
0
votes
1answer
15 views

MediaElement freezing after 5 seconds every time

I am using a MediaElement for viewing both normal images and gif images, but the gifs freeze after 5 seconds every time. The ones that are longer than 5 seconds dont finish, while those who are less ...
0
votes
1answer
29 views
+50

How to move the caret to after the end-quotes when typing XAML?

After typing something like: <StackPanel Name="someStackPanel" the caret is before the end-quotes. The only way I know of transferring the caret to the right of the end-quotes (so I can continue ...
0
votes
1answer
32 views

UWP - How to properly recycle items in ListView?

I'm presenting a heterogeneous data array in ListView by listening to ChoosingItemContainer event. Everything works fine, except for item recycling: ListView keeps suggesting wrong container type (it'...
0
votes
1answer
47 views

MenuItems' Icon size changes on different systems

I have a WPF UserControl hosted inside of a WinForms application. This UserControl has a ContentControl which has a ContextMenu. The ContextMenu has a few MenuItems, all of which have their Icon ...
-2
votes
0answers
30 views

How can I bind a property to a textbox?

My xaml.cs public partial class ViewersWindowEditor : Window { public ViewersWindowEditor() { InitializeComponent(); } private static Logger _logger = LogManager....
0
votes
2answers
63 views

Difficulties with data-binding

Databinding is a difficult concept that I still can't quite grasp despite reading through dozens of topics already. I want to have a TextBox that would change its text every time a field 'status' is ...
0
votes
0answers
48 views

Best way to catch Xaml errors in Xamarin in Visual Studio 2019?

I'm new to Xamarin and not a big fan of WPF. I'm taking a course on Udemy and the instructor is showing how to catch xaml errors at compile time. The problem is, the current version of Xamarin that ...
0
votes
0answers
41 views

How to notify ViewModel when properties binded to an ObservableCollection change?

I'm using a HierarchicalDataTemplate to build a menubar that will have MenuItems that are checkable. In my ViewModel, I create an ObservableCollection of a class called MenuItemModel, then bind the ...
0
votes
2answers
42 views

Xamarin Grid does not split evenly

I want two labels contained within a ListView DataTemplate Cell to split evenly horizontally across the screen. From my understanding, if you use a Grid and set the two ColumnDefinitions to 1* it ...
1
vote
0answers
24 views

How can I programmatically set the XmlDataProvider? [duplicate]

I'm currently loading an XmlDataProvider in my window using the following code: <XmlDataProvider x:Key="xmldata" Source="C:\test-file.xml" XPath="/root" /> and a HierarchicalDataTemplate: &...
0
votes
0answers
20 views

ListView StyleTriggers not working when using custom ItemTemplate

In my application I have a ListView and I need some Style.Triggers. I use custom ItemTemplate so that I have an icon next to text. The strange part is that triggers aren't working when I don't use ...
0
votes
0answers
15 views

How to fix ArgumentException when binding to Business logic class

I'm trying to bind a textbox with my business logic class. In the business logic class I throw an ArgumentException when the property (name is my example) is empty or null. This creates the problem: ...
0
votes
0answers
27 views

Is there a better way to bind to JObject with XAML on Xamarin Forms?

I am pulling JSON from a Node API. I want to be able to just parse the response with a JObject instead of a pre-defined type. This would give me more flexibility as to what I want to do. Here is a ...
0
votes
0answers
44 views

How to leave ScrollViewer's focus with keyboard navigation in WPF

I'm having issue with keyboard navigation and ScrollViewer. This is my setup: <DockPanel> <Button DockPanel.Dock="Top" Content="Add" /> <Button DockPanel.Dock="Top" Content="...
0
votes
1answer
20 views

How do I add a Custom Overlay for ZXingScannerView in Xamarin Forms using the MVVM pattern?

I have spent some time getting examples elsewhere on SO to get a Zxing Scanner view to work with a ViewModel. I am able to get the scan event to fire, but the visuals had all disappeared. I'm trying ...
0
votes
0answers
14 views

WPF use Datatrigger on list [duplicate]

I want to change the foreground color (or any other property) of a TextBlock when a specific list was put on a ItemsControl element. The ItemTemplate of the ItemsControl element is predefined and ...
0
votes
1answer
10 views

How to use a label to dispaly the combination of string and URL with underline

I am using a bel which will have to display the string which is a combination of string and url. For example: Refer to this: https://www.google.com/ or https://www.google.com/ watch this. I need to ...
0
votes
2answers
38 views

How to Remove this Arrow or Image From IOS Listview in Xamarin forms

when i write a listview in xamarin forms this icon is auto added to IOS and this is not present in Android i tried removing this using custom renderer by rendering viewrenderer but this this view ...
0
votes
2answers
45 views

Not chaging Text.Color in disabled Button

I want change the Text.Color when the Button is disable. How can I do it? Xaml Button: <Button Text="-" TextColor="White" Padding="0" CornerRadius="4" FontAttributes="Bold" FontSize="Small" ...
0
votes
1answer
38 views

Button in a different file than the main

I have 2 button but they need to be in a different file than the mainWindow.cs. I can't figure how to do that. So the Button_Click_2 must be in the ReadData.cs and the Button_Click_3 must be in the ...