Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Browsing all 18858 articles
Browse latest View live
↧

convert to c#

Hi All.How to convert to C#Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.Convert Dim bi As...

View Article


MVVM Light and the proper namespace

Hi,I just installed the MVVM Light package (Tools>Extensions and Updates > MVVM Light for VS2015)When I start my project, I choose the MVVM WPF project option (oh boy, does it include extra .cs...

View Article


How to get a "Transparent" Popup in the top of...

Hi,I have a "XBAP" Application in which I need to show a "Transparent" Popup over theĀ Systems.Windows.Forms.WebBrowser control. WebBrowser control is in bottom layer and Transparent popup must be in...

View Article

F# EllipseGeometry: namespace 'Media' is not defined error

Ā In my source file I have:open System.Windows.Media...let eg = EllipseGeometry(new Point(50, 50), 20, 45)...I get this error:"error FS0039: The namespace 'Media' is not defined"I'm using the open...

View Article

Powershell, WPF and RTBs

This was a simple task in winforms but wpf has proven to be quite stubborn. How do you change the text color for specific lines being added to the richtextbox?Two buttons in the code below, the first...

View Article


How do I return underline as something to be assigned to the TextDecoration...

I'm working on writing a value converter that will either return TextDecorations.Underline depending on what's in a table, or it will not. In other words, either the table says this text block is...

View Article

Image may be NSFW.
Clik here to view.

Question to the application

Hi, where is the option to center the Window that is running .xaml page, on the screen of the machine? And how to adjust the application's icon below?Many Thanks & Best Regards, Hua Min

View Article

WPF prevent TreeViewItem to inherit contextMenu from parent by code

I have the following code and I set explicite the ContextMenu from a TreeViewItem to null but it shows all the time the same ContextMenu as the treeviewitem parents! Is that a bug? and how can I solve...

View Article


Add control to grid

Visual Studio 2015, WPF, C#I'm trying to add a nullable date picker to my project. I'm using the following code to add the date picker to my gridGridTableEdit.Children.Add(dtp);but I'm getting the...

View Article


WPF - Using behaviors for instantiating view model and services

I am trying to find the best practice for creating view models and services (service just talks to the server and return data back to view model). I have seen 2 different approaches.Using view model...

View Article

XpsDocumentWriter.Write() : Bad quality when FixedPage's contents is...

Hi, all.Please execuse my poor english! :)I have a strange problem with XpsDocumentWriter.I wrote sample program to test Xps printing as below: private void CreateXps() { FixedDocument fd = new...

View Article

Objects don't move or change in the ItemsControl?

ItemsControls is as follow:<ItemsControl x:Name="icShell" ItemsSource="{Binding NozzleCanvasN}"><ItemsControl.Resources><DataTemplate DataType="{x:Type...

View Article

how to see a flowdocument table while in debug?

I am building a table on the fly in a FlowDocument. I have to build it on the fly because the number and type of rows are not static. At a basic level, I have no problem building the table (no syntax...

View Article


Animation freezing

Greetings,I am trying to find a way to keep an animation running while I am doing work behind. This can normally be done with the BackgroundWorker, but some of the work that needs to be done is load a...

View Article

WPF play video files from another server to client machine in Media Element

Hi,I am developing WPF application to display video in Media Element, and the video files are kept on another server.I want to display those videos on client machine using buffering approach in...

View Article


Star sizing in Style Setters

Hi,I am having application which works on different displays.I am having many controls. I just want to align it, to all the display modes.I can achieve it by usingĀ 1....

View Article

Image may be NSFW.
Clik here to view.

Changing property of an element in a set of ListBoxItems?

I have a list box with a simple Ellipse I will use as an indicator and some text. I want to change the Fill of the ellipse depending on the state of an object relating to the text.I can change the...

View Article


[WPF] Use a UI element instance created in C# in XAML.

Situation: An instance of the Ellipse class is created in C#.Goal: To use it in XAML.Problem: I don't know how.Questions:1. Is it possible?2. If possible, how?Code:public partial class MainWindow :...

View Article

How do I pass the name of the field into a value converter?

This is a bit unconventional. I've written a value converter that returns a TextDecorationCollection. My intent was to get that by using thevalue parameter of the Convert() method to be the name of the...

View Article

WPF: Why customized image button does not work with TextBlock in its...

we following link: http://www.codeproject.com/Tips/773386/WPF-ImageButtonto implement a ImageButton. public class ImageButton : Button { #region Properties public ImageSource Image { get { return...

View Article
Browsing all 18858 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>