2,686 questions with Windows Presentation Foundation tags

Sort by: Updated
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,686 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
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,686 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,686 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
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,686 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
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,686 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
1 answer

Flowdocument Table - custom border style

Is there any option to create a custom border style for Wpf Table (type of Content Element for FlowDocuments), like create a rounded corners? I'm thinking that It might be possible with drawing PathGeometry or using Adorner, but I don't know how to do…

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,686 questions
asked 2020-04-10T12:23:26.977+00:00
Luka Ciglar 21 Reputation points
commented 2020-04-20T18:10:08.267+00:00
Luka Ciglar 21 Reputation points
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,686 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
6 answers

Listbox add item makes logic not work

I have a listbox that has 3 items at design time, my logic works, but if I add a button that adds 100 items at run time it does NOT. I am trying to switch the color of the selection to a different colors with a case statement. public int caseSwitch {…

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,686 questions
asked 2020-04-09T08:22:24.59+00:00
LexiCodes 1 Reputation point
commented 2020-04-17T07:30:20.603+00:00
Peter Fleischer (former MVP) 19,231 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,686 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,231 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,686 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
1 answer One of the answers was accepted by the question author.

Wondering if sharing a Shared Project between different solutions, is the wrong approach?

Some days ago I asked in this forum How to use a SharedProject between different solutions? And @Anonymous answered it (thanks again, Alex!) But now I'm wondering if that's the wrong approach. Unless I'm misunderstanding the answer, it seems to me that…

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,686 questions
asked 2020-04-09T21:01:55.473+00:00
Rod At Work 866 Reputation points
accepted 2020-04-15T15:42:16.313+00:00
Rod At Work 866 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,686 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

How to set the Highlight brush to random color

I have this code below that sets the color to random, how to set the selected Listbox item to random?? private void button_Click(object sender, RoutedEventArgs e) { Brush brush = new SolidColorBrush(Color.FromRgb((byte)r.Next(1, 255), …

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,686 questions
asked 2020-04-08T22:40:09.633+00:00
LexiCodes 1 Reputation point
commented 2020-04-15T06:36:38.597+00:00
Alex Li-MSFT 1,096 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,686 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
3 answers

im using word Inetrop in a WPF C# App Which i find a word and Change its color to red and im facing issues

This is my Code it works but I have a problem at the third part when I try to change the word 'No' color to red it changes any word that includes 'No' for example 'Not Isolated' was Effected by this and its color was changed how can i specify that i…

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,686 questions
asked 2020-04-08T01:23:51.503+00:00
IProfileTNo 1 Reputation point
answered 2020-04-15T01:33:15.183+00:00
Alex Li-MSFT 1,096 Reputation points
0 answers

Reg: Clear previously logged-in users list from OneDrive login screen

Hi Team, We have developed a WPF application, where multiple users can log in to our application. We are using WPF web browser control to load the one drive login page. Our requirement is to not show the previously logged users' information on the…

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,686 questions
asked 2020-04-06T05:33:55.607+00:00
Chakradhar Y 1 Reputation point
commented 2020-04-14T09:31:06.883+00:00
Alex Li-MSFT 1,096 Reputation points
1 answer

How to increase WPF 3D Performance?

I have a problem looking forward to your suggestions about WPF 3D performance. It runs quite well with a small width and length, but with a width and length of about 949x825 When measured by stopwatch, all of the implementation in c# code only takes…

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,686 questions
asked 2020-04-10T04:58:49.733+00:00
Dragon 81 Reputation points
commented 2020-04-13T07:57:02.457+00:00
Dragon 81 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,686 questions
asked 2020-04-12T14:11:16.517+00:00
RogerSchlueter-7899 1,236 Reputation points
accepted 2020-04-12T20:57:39.707+00:00
RogerSchlueter-7899 1,236 Reputation points
2 answers One of the answers was accepted by the question author.

Can't Get My Image to Appear in an Image Container

I have all the parts to display an image in the wpf Image control but I cant' get them all wired together. First I have a Picture class as follows ((ignoring irrelevant code): Public Class Picture .... Private _Image As Byte() Private _Title As String…

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,686 questions
asked 2020-04-03T16:04:42.707+00:00
RogerSchlueter-7899 1,236 Reputation points
accepted 2020-04-12T17:15:24.51+00:00
RogerSchlueter-7899 1,236 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,686 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,231 Reputation points