How to set a border on a list box item

I have a ListBox in which the items are created from an item source, I need every item to have a border but I have no clue where I even set a style for ListBox items. <ListBox x:Name="m_list"> <ListBox.ItemTemplate> <Dat...
more »

2017-09-11 15:09 (2) Answers

Saving Data On C# Wpf

How can I save my added buttons when closing the program ? Each time I hit an add button I'm creating a new title which type is button.And each title have it's own specific words.So I must save the words in buttons at the same time. ...
more »

2017-09-11 13:09 (1) Answers

Combox not updating with binding

Everytime i change my selected item inside my UI it's not updating my combobox. XAML <ComboBox x:Name="CompanyComboBox" HorizontalAlignment="Left" Height="26" Margin="100,41,0,0" VerticalAlignment="Top" Width="144" SelectionChanged="Co...
more »

2017-09-08 13:09 (2) Answers

UWP: Create shadow in XAML

I am currently trying to create a circular button with two ellipse-elements in UWP and want one of them to throw a shadow at a certain angle. I found a way to do so in WPF which looks like this: WPF XAML: <Ellipse> <Ellipse.BitmapEffect...
more »

2017-09-05 12:09 (2) Answers

XAML, Secondary Button isn't showing

so I'm trying to use 2 buttons in the same spot using xaml, one is going to be a play button and the other a pause button, but for some reason, not entirely sure as to why just yet, but only the first button in XAML will show, and if i set this given...
more »

2017-09-05 11:09 (1) Answers

Why does rotation take abrupt jump?

This is a WPF desktop app. I'm using Thumb control to rotate my objects. While it works nice and smooth in general, there is an abrupt jump in the rotation angle every time I start rotating. After the initial jump, rotation works smoothly again. Ver...
more »

2017-09-04 15:09 (1) Answers

WPF PresentationFramework.Aero2 not found

I'm trying to equip my first WPF application with a windows-like theme instead of the predefined gray buttons etc. I read on SO to add this resource dictionary: <ResourceDictionary Source="/PresentationFramework.Aero2;component/themes/Aero2.Norm...
more »

2017-09-03 16:09 (1) Answers

Fill Ellipse with wave animation

I have created an ellipse in Windows Phone 8.1 Silverlight App and UWP both and I wanted to fill it with animating waves, For this purpose, I am following this solution but it is for WPF so I am unable to use some control like "Visual Brush". I wan...
more »

2017-09-03 09:09 (2) Answers

Editable ComboBox Open Select File Dialog

I have a ComboBox with 3 options: off auto select off and auto are normal items, but select changes the ComboBox to editable and opens a Select File dialog box. But when I press ok, the selected file will not appear in the ComboBox editable text...
more »

2017-09-02 02:09 (1) Answers

Embed XAML.CS into Powershell WPF Tool

Im currently working on a little tool that has multiple tabs, one of these tabs is a Profile Reset Tool. This is the current GUI The powershell fully functions as I want it to however I do not have suitable XAML Code to handle Click Events. I know ...
more »

2017-09-01 14:09 (0) Answers

TreeView with nested List

I want to display some objects in a treeview, but so far unfortunately without success. I've a ObservableCollection <ICustom> of objects: Settings.ListOfCustomers The interface of the object ICustom: int Id { get; } int age { get; } Custome...
more »

2017-09-01 06:09 (2) Answers

Error Implementing Design Time Data Template

I want to display dummy data in the design window of a WPF GridView and found a similar example: Answer: Design time data for datatemplate in xaml - Stack Overflow I created a new WPF App (.NET Framework 4.6.1) named WpfDataTemplate and copied in t...
more »

2017-08-31 23:08 (1) Answers

Selecting TabItem in TabControl from ViewModel

I have been struggling with this for a day or so, can't figure out what I'm doing wrong here. I want to be able to select any tab in my observable collection of tabs, and I want my selection to be visible in the UI. I have tried SelectedIndex and Sel...
more »

2017-08-29 11:08 (1) Answers

TextBlock displaying list of objects

If I use following code to display objects in a ListBox, how can I display it in a TextBlock? listStudents.Items.Clear(); foreach (Student sRef in StudentList) { listStudents.Items.Add(sRef); } ...
more »

2017-08-27 23:08 (3) Answers

Bind to property of a child in XAML

I have a object CellContent with the properties Text and BackgroundColor. With the CellContent objects I created a list of Persons with the properties FirstName and LastName. I bound this list to a DataGrid. What I like to do, is to set the backgroun...
more »

2017-08-27 22:08 (1) Answers

Global Style in UWP XAML

I have set some styles in the App.xaml <Style TargetType="TextBlock"> <Setter Property="Foreground" Value ="HotPink"/> </Style> This style works on normal controls, but not inside DataTemplates <TextBlock Text="Test">&...
more »

2017-08-27 15:08 (1) Answers