24,878 questions with .NET-related tags

Sort by: Created
0 answers

WPF Binding multiple usercontrol to one viewmodel

My program is basicly a truck diary. I have a main page that is set up like a diary with days of the week listed. In them days of the week I have a custom control called TripUI which is setup in a listview and bound to a ObservableCollection from my…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-24T07:27:33.197+00:00
Shaban Mehmet 1 Reputation point
commented 2020-04-24T09:47:38.893+00:00
Peter Fleischer (former MVP) 19,311 Reputation points
2 answers

How do i get back a listbox item after a window closes in C# WPF

I have 1 Listbox it takes items from TextBox, when an item is added to the listbox and the application is closed, upon opening the application the item added to the listbox will still be present. Use case: User opens application. User adds item…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-22T06:02:19.737+00:00
Sahana M 1 Reputation point
commented 2020-04-28T08:55:35.543+00:00
Alex Li-MSFT 1,096 Reputation points
3 answers One of the answers was accepted by the question author.

[C#7.0 - WPF] - RichTextBox in a DataGridTemplateColumn with binding

Hi, I'm getting crazy about a RichTextBox to insert and bind to a DataGridTemplateColumn. I have As you can see, in a cell of the DataGridTemplateColumn I have four lines and what I would like is to have these lines colored in different…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-21T17:10:59.81+00:00
BlackSun 21 Reputation points
commented 2020-04-22T12:13:22.29+00:00
BlackSun 21 Reputation points
0 answers

WPF : Cursor not visible in text box first position in RightToLeft flow direction

Hi, I have tried to remove all margin value in TextBox by accessing inner element and set Margin as 0. With this value cursor not visible in RightToLeft direction first place. But working fine in LeftToRight direction. LeftToRight: RightToLeft:  You…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-21T04:16:07.127+00:00
Muneesh Kumar 1 Reputation point
commented 2020-04-24T01:58:27.463+00:00
Alex Li-MSFT 1,096 Reputation points
1 answer

How to reduce the size of a MSIX .Net Core 3.1 installation?

I have a WPF/.Net Core 3.1 app that I'm packaging as an MSIX for submission to the Store. If I publish the app as a sideloading .msixbundle then install it, the resulting directory is WindowsApps is huge. I assume that's all of .Net Core. But most of the…

Universal Windows Platform (UWP)
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-20T22:02:07.5+00:00
Chuck Bohling 346 Reputation points
answered 2020-05-25T01:23:50.087+00:00
Lex Li (Microsoft) 5,237 Reputation points Microsoft Employee
0 answers

Is there any UWP API/way available to detect/prevent hooking?

There are many tools available to do hooking eg: frida 29.html. But i didn't find any API or way to detect hooking . Is there any API or way to detect hooking in Universal Windows Platform(UWP)? If yes, can it detect all kinds of…

Universal Windows Platform (UWP)
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-20T10:47:26.973+00:00
Rahul K 51 Reputation points
commented 2020-04-23T01:14:44.55+00:00
Richard Zhang-MSFT 6,936 Reputation points
2 answers

Issues using ResourceDictionary in a C# class library

I'm having trouble with reusing styles for WPF/XAML in my project. Just to give you some context. I am making a plugin for Revit, architectural/3D/CAD software used by many architects/contractors worldwide. To make a plugin for Revit, the Revit API…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-20T08:47:13.967+00:00
Martijn van gils 1 Reputation point
commented 2020-04-23T08:34:04.263+00:00
Martijn van gils 1 Reputation point
1 answer

ObjectAnimationUsingKeyFrames. Is it possible Canvases usage instead of Images?

Hello everyone, I'm currently using Storyboard type based on Image replacement. The code is below. It works fine, however there's a question arisen. Is there a way to replace images with canvases? Simple I failed to find such a variant in the Web. …

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-19T18:07:45.94+00:00
cron kropjc 41 Reputation points
commented 2020-04-23T02:52:22.94+00:00
Alex Li-MSFT 1,096 Reputation points
3 answers

I have a problem with 'NoteViewer' in XML。

Dear sir, I managed to create a sample mentioned here with WPF App and Blank App (Universal Windows) http://musicengravingcontrols.com/en-US/Articles/Display?id=2 However, I have a problem here. Error Lists say "Unknown type…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-18T05:36:28.407+00:00
寛明 水崎 1 Reputation point
commented 2020-05-01T06:13:25.173+00:00
寛明 水崎 1 Reputation point
1 answer One of the answers was accepted by the question author.

Interaction DataTrigger doesn't work. Could anyone test this example. Perhaps I'm doing something wrong.

Hello everyone, here's a simplest code the purpose of which is animation launching from ViewModel. Some people claim that it is working code. There are not any mistakes. exceptions and it doesn't work. Could anyone test this example. perhaps I'm…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-17T11:18:04.82+00:00
cron kropjc 41 Reputation points
commented 2020-04-19T17:36:58.957+00:00
cron kropjc 41 Reputation points
1 answer One of the answers was accepted by the question author.

Is knowing Screen lock status from UWP app possible?

When my Universal Windows Platform(UWP) app is open and user locked the screen i want to know that screen is locked i.e., status of the screen lock. When the screen is locked the 'OnSuspending' method of App.xaml.cs will be fired. Now whatever the…

Universal Windows Platform (UWP)
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-17T07:12:59.173+00:00
Rahul K 51 Reputation points
accepted 2020-06-01T10:52:37.583+00:00
Rahul K 51 Reputation points
2 answers

Drag, Cling, Dock a dialog

Hi, I am working on a WPF project where I will launch a new dialog inside a Window. User should be able to drag this dialog box to the edge of the window and if it is close enough, it should cling on to that side of the window like docking. User can…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-17T02:49:08.257+00:00
Vijay Kamat 1 Reputation point
commented 2020-04-27T02:26:38.763+00:00
Alex Li-MSFT 1,096 Reputation points
4 answers

Need help writing a UserControl

I trying to create a UserControl that will be added a variable number of times to a wpf window at run-time. This is my first attempt at a UserControl. I have two requirements for this UserControl: The content of the label is to be defined at…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-16T21:42:02.433+00:00
RogerSchlueter-7899 1,256 Reputation points
commented 2020-04-24T16:16:26.133+00:00
RogerSchlueter-7899 1,256 Reputation points
2 answers One of the answers was accepted by the question author.

Need to focus the grid which placed inside the Scroll Viewer on Mouse Click

Problem 1: I need to focus the Grid(UI Element) when it is placed inside the Scroll viewer. Code: <ScrollViewer> <Grid x:Name="RootGrid"> <Border Height="24" …

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-16T12:52:01.073+00:00
Magesh Sankar 36 Reputation points
accepted 2020-04-29T11:23:52.39+00:00
Magesh Sankar 36 Reputation points
1 answer

how to customize charts in WPF? (using System.Windows.Controls.DataVisualization.Charting)

i am working on LineSeries Chart . i want to have following customizations 1) the Box in which legends are shown i wan to remove it , as i have single series i dont want legends and box. in my case an empty box is there. please refer the image 2) how…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-15T20:55:15.187+00:00
Aniket Khot 1 Reputation point
answered 2020-04-16T03:25:26.737+00:00
Alex Li-MSFT 1,096 Reputation points
2 answers

WPF IValueconverter is Not Firing When Click the radio button

Here is my xaml below. The DisplayUnitConverter is not firing when I click the radio buttons. Can someone assist me to see what I am doing wrong? I have initialize the Element name in the SpinEdit control to the Radio Control name. <Window…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-15T12:10:29.503+00:00
pianoboy11 1 Reputation point
answered 2020-04-16T07:12:54.537+00:00
Peter Fleischer (former MVP) 19,311 Reputation points
1 answer

How to maintain two slightly different XAML for two projects?

I have two projects in my hands that are used in different scenarios. There are many XAML pages in these two projects, and some of page in one project is copied from another project(old version) and modified namespace, added some new things. Now I am…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-15T06:56:14.587+00:00
Flithor 196 Reputation points
answered 2020-04-15T15:35:54.31+00:00
Rod At Work 866 Reputation points
1 answer

WPF - Auto width for FlowDocument's content

Hello, I'm having a hard time trying to make a RichTextBox's content in my app auto-sized. Specifically, I want the content inside my RichTextBox to be of automatic width (with a MaxWidth boundary), and Wrap when the width exceeds the available space. …

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-13T14:07:26.567+00:00
Nicolás Bosi 1 Reputation point
answered 2020-04-15T06:26:27.137+00:00
Alex Li-MSFT 1,096 Reputation points
1 answer One of the answers was accepted by the question author.

Why this error when doing an image conversion

I am trying to convert a BitmapImage to a Byte() with the following code: Dim ic As New ImageConverter Dim bts() As Byte = DirectCast(ic.ConvertTo(clsImage, GetType(Byte())), Byte()) The error message I get is: > Unable to cast object of type…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-12T14:11:16.517+00:00
RogerSchlueter-7899 1,256 Reputation points
accepted 2020-04-12T20:57:39.707+00:00
RogerSchlueter-7899 1,256 Reputation points
1 answer

XAML > Binding SelectedValue to a concatenation of 2 properties

Hi, I've a Person class public class Person { public string location; public string name; ... } ...and a list of Person List<Person> list1 = new List<Person>() { new Person() { location = "Chicago", name =…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
asked 2020-04-12T08:04:22.117+00:00
JM Deb 1 Reputation point
answered 2020-04-12T09:15:55.863+00:00
Peter Fleischer (former MVP) 19,311 Reputation points