logo
down
shadow

WPF QUESTIONS

WPF InkCanvas Z-Index for strokes
WPF InkCanvas Z-Index for strokes
wish help you to fix your issue The map editor which is part of our game suite uses ink to draw terrain so I have recent experience of this sort of thing.The way my app works is you select a thing you're drawing ( woods, road, contour etc ) and draw
TAG : wpf
Date : November 24 2020, 04:01 AM , By : Syama S Panicker
WPF Hiding the First Item of an ItemsControl (Combobox,textbox,etc)
WPF Hiding the First Item of an ItemsControl (Combobox,textbox,etc)
Hope that helps You can declare a boolean property which will return false if Collection.Count() == 1 and use a boolean to visibility converter for your combo box
TAG : wpf
Date : November 21 2020, 04:01 AM , By : nadeem Saif
Why does my WPF combobox displays Model name that is binded when selected?
Why does my WPF combobox displays Model name that is binded when selected?
Hope that helps Set the ContentTemplateSelector property of the ContentPresenter below the ToggleButton and it should work as expected:
TAG : wpf
Date : November 18 2020, 04:01 AM , By : user2184144
WPF and powershell, need to know how to add style to a control element
WPF and powershell, need to know how to add style to a control element
wish help you to fix your issue I am having some trouble setting the style to a groupbox control element. , You should set the Style property to a Style:
TAG : wpf
Date : November 10 2020, 04:01 AM , By : user2181589
Make images in grid same size
Make images in grid same size
I wish this helpful for you You could pick one of them you think is a good size and bind the height and width of the others to that one.For example.
TAG : wpf
Date : November 08 2020, 04:01 AM , By : Stefan Martin
DataPicker Button influenced by a global styling on all Buttons
DataPicker Button influenced by a global styling on all Buttons
I wish this help you You can override the Style for the Buttons locally. The following XAML sets the Style for all Buttons inside the DatePicker back to the default Style.
TAG : wpf
Date : November 07 2020, 04:01 AM , By : user2180489
How to change WPF Combobox color to White when no items are selected?
How to change WPF Combobox color to White when no items are selected?
With these it helps You need to modify the template. Right-click on the ComboBox element in design mode in Visual Studio or in Blend and select the "Edit template" option and then the "Edit a copy..." option to copy the default templates into your XA
TAG : wpf
Date : October 28 2020, 07:41 AM , By : Zi2177005
Hiding popup on mouse click with Popup.StaysOpen in WPF
Hiding popup on mouse click with Popup.StaysOpen in WPF
it should still fix some issue I got my UserControl that contain: , You can also bind the StaysOpen property on the togglebutton :
TAG : wpf
Date : October 27 2020, 03:37 PM , By : user3847887
XAML WPF Vertical Scroll bar line by line instead of group by group when grouping
XAML WPF Vertical Scroll bar line by line instead of group by group when grouping
Hope this helps I had this same problem and found this post to see if there was an answer. I finally found a solution to the problem. I wrote my own ControlTemplate for the ListView control and I didn't add the following trigger:
TAG : wpf
Date : October 26 2020, 11:52 AM , By : Tyngrysek
WPF <StatusBar> is not positioned at the bottom of the window
WPF <StatusBar> is not positioned at the bottom of the window
this will help In addition to ArsenMkrt's answer about including the DockPanel.Dock="Bottom" attribute, don't forget that the LAST element in a DockPanel will fill the area unless you explicitly tell it otherwise using a height command (regardless of
TAG : wpf
Date : October 26 2020, 11:52 AM , By : user3848057
Multicolumn listview in WPF at design time
Multicolumn listview in WPF at design time
Any of those help Each column in the listviewitem is rendered based on the GridView definition, so there is no real concept of column numbers. What you do is bind objects to the the listview's itemsource and it creates listviewitems from it. Thus, th
TAG : wpf
Date : October 26 2020, 11:51 AM , By : ramspopo
WPF DropShadow Disappears
WPF DropShadow Disappears
I hope this helps you . I wish I had a good explanation for you, but there were some weird things in your XAML that I played with and I think I have a solution for you. If you use a Grid, most likely you want to lay out a specific number of rows and
TAG : wpf
Date : October 26 2020, 11:51 AM , By : Eng Saqib Pti
WPF- Changing Tooltip background to Transparent
WPF- Changing Tooltip background to Transparent
it should still fix some issue I am attempting to make it so that when I hover over a button in my application, the "tooltip" displays my wording, along with a transparent background, instead of the white background.
TAG : wpf
Date : October 26 2020, 11:51 AM , By : user3848252
in wpf datagrid how to get the blank row on top?
in wpf datagrid how to get the blank row on top?
wish help you to fix your issue What about NewItemPlaceholderPosition.AtBeginning? I don't have a code example but that seems to be what you're describing. You could always do what Johan is suggesting and Move or Sort the items in the grid programmat
TAG : wpf
Date : October 26 2020, 11:51 AM , By : user3848231
Prism: Exception handling?
Prism: Exception handling?
wish of those help We figured out the problem here. We are using v2.2 of the prism libraries. In the BackgroundEventSubscription class, when the event is being published, a background worker is created and invoked. The RunWorkerCompleted delegate is
TAG : wpf
Date : October 26 2020, 11:51 AM , By : user3848223
NLTK in IronPython from WPF
NLTK in IronPython from WPF
wish of those help It definitely is possible, as long as NLTK doesn't use any C extensions. It will be much easier if you use VS2010 though, because of the dynamic keyword. Look at the Microsoft.Scripting.Hosting library from IronPython, it will get
TAG : wpf
Date : October 25 2020, 07:29 PM , By : Nechama
WPF: How can i scale to fit the content?
WPF: How can i scale to fit the content?
this will help Use Grid as the container. Any control placed inside of the Grid will directly fill the whole Grid, and its size (the width and height) will match the size of the Grid.
TAG : wpf
Date : October 25 2020, 07:29 PM , By : Manju Kori
listbox dragdrop in wpf
listbox dragdrop in wpf
wish of those help Ok... I found a solution for my Problem, based on this tutorial:
TAG : wpf
Date : October 25 2020, 07:29 PM , By : user3848373
Resizing Listbox Contents according to Listbox dimensions
Resizing Listbox Contents according to Listbox dimensions
wish help you to fix your issue I assume when you say "resize" you mean that you want to stretch the items in both directions. To take a default ListBox and stretch the items horizontally all you need is:
TAG : wpf
Date : October 25 2020, 12:12 AM , By : user3848647
WPF InvalidateMeasure not called during or after animation
WPF InvalidateMeasure not called during or after animation
should help you out RenderTransform modifies the appearance of the element but is applied after the layout pass is complete. That means using a RenderTransform does not incur a layout pass.Instead, use LayoutTransform. It does affects measure...
TAG : wpf
Date : October 24 2020, 11:12 AM , By : user3848847
How can I define how many spaces a TAB jumps in a XAML TextBox?
How can I define how many spaces a TAB jumps in a XAML TextBox?
this will help When the user presses a tab in this textbox, the cursor jumps an equivalent of 8 spaces. , You can create your own TextBox control to give the desired affect:
TAG : wpf
Date : October 24 2020, 11:12 AM , By : user3848807
The calling thread must be STA, because many UI components require this
The calling thread must be STA, because many UI components require this
To fix this issue Try to invoke your code from the dispatcher:
TAG : wpf
Date : October 23 2020, 11:12 PM , By : user3849017
WPF Popup hiding problem
WPF Popup hiding problem
it fixes the issue Ok, here is some code that works for me (those are copy-pasted from working code with some of the not-interesting parts removed):Here's the content of a ComboBox-like UserControl:
TAG : wpf
Date : October 23 2020, 03:00 PM , By : Device78
ModelVisual3D vs Model3DGroup
ModelVisual3D vs Model3DGroup
will be helpful for those in need The answer is Yes. Having many ModelVisual3ds will be orders of magnitude slower than using a Model3DGroupMy understanding is that ModelVisual3D is more akin to a UIElement, i.e. more of a heavy weight object. MSDN s
TAG : wpf
Date : October 23 2020, 03:00 PM , By : Digivent
Composite Commands Not Working
Composite Commands Not Working
will help you When using PRISM if you are creating a CompositeCommand with monitorCommandActivity set to true, you also need to be aware of and set DelegateCommand.IsActive state.In that case CompositeCommand will not consider inactive DelegateComman
TAG : wpf
Date : October 23 2020, 03:00 PM , By : CashRegister
WPF ListBox Scroll to end automatically
WPF ListBox Scroll to end automatically
may help you . In my application, I have a ListBox with items. The application is written in WPF. , Try this:
TAG : wpf
Date : October 23 2020, 11:12 AM , By : John
'Default' text for templated combo box
'Default' text for templated combo box
it fixes the issue The Text property is used when the ComboBox is editable. You can set a default "Select" type message by adding an element to the ControlTemplate that shows up only when there is no selection and then disappears. Using this method y
TAG : wpf
Date : October 22 2020, 11:12 AM , By : user3849667
MDI and WPF Ribbon
MDI and WPF Ribbon
will be helpful for those in need Can you use a Frame in a Window that showing a page and Navigate this?
TAG : wpf
Date : October 19 2020, 11:12 PM , By : user3850514
WPF FontSize style hangs / freezes / stops responding
WPF FontSize style hangs / freezes / stops responding
hop of those help? Hey everyone, I found a solution to this problem. I had to stop the FontCache service for framework 3.0 and delete the font cache.dat file that I assume was corrupt. See link belowhttp://social.msdn.microsoft.com/Forums/en-US/wpf/t
TAG : wpf
Date : October 19 2020, 11:12 AM , By : Neil
WPF: Textbox width guidelines
WPF: Textbox width guidelines
seems to work fine I think it really depends on the font you are using. I'm sorry for not giving you the formula, but you can find FormattedText class helpful. Especially its Width property.In case of fixed-width fonts it's as easy as measuring any c
TAG : wpf
Date : October 18 2020, 11:12 PM , By : user3850767
WPF mediaelement
WPF mediaelement
seems to work fine You can use a DispatchTimer. This article provides some good insight on how to get this working. MediaElement and More with WPF. Here is some sample code that I took from a project I'm working on. It shows the position of the video
TAG : wpf
Date : October 18 2020, 11:12 AM , By : raynault
MVVM Passing data to dialog View Model
MVVM Passing data to dialog View Model
Hope that helps I would perhaps do it in the following way: The command attached to the edit button starts edit dialog, creating a custom ViewModel (VM) for it. The command itself should be perhaps either in the list's VM or in the Model (not quite s
TAG : wpf
Date : October 18 2020, 11:12 AM , By : user3850918
Embedding WinForms Graph in WPF Window
Embedding WinForms Graph in WPF Window
I think the issue was by ths following , Could you try the following code and see if you can get a graph to display and then work from there?MainWindow.xaml.cs
TAG : wpf
Date : October 16 2020, 11:12 PM , By : arturofha
WPF: Focus in a Window and UserControl
WPF: Focus in a Window and UserControl
wish of those help I'm trying to get a UserControl to tab properly and am baffled. The logical tree looks like this. , I know this response is quite late... but have you tried:
TAG : wpf
Date : October 16 2020, 11:12 AM , By : hoptii
How can I stretch bitmap in WPF without smoothing pixels
How can I stretch bitmap in WPF without smoothing pixels
I hope this helps you . Finally found an answer, with some help from Experts Exchange. Class RenderOptions defines attached property BitmapScalingMode, which can be set to NearestNeighbor. So,
TAG : wpf
Date : October 16 2020, 11:12 AM , By : user3851650
Changing DataTemplate TextBlock Property at Runtime
Changing DataTemplate TextBlock Property at Runtime
I wish this help you A DataTemplate is a template for creating the content. When calling LoadContent on the template, it creates the content defined by that template. Therefore, when you make changes to the TextBlock, it is only being applied to that
TAG : wpf
Date : October 15 2020, 11:12 PM , By : Jozef BudziƄski
Image source using project resource (WPF)
Image source using project resource (WPF)
Hope this helps First, mark you image file as a "Resource" in the properties window of Visual Studio. Then you can quite easily reference the resource using the file name:
TAG : wpf
Date : October 15 2020, 11:12 AM , By : Rafal Bobrowski
WPF combobox colors
WPF combobox colors
To fix this issue You want to check Style Triggers . Also need to override the ItemContainerStyle to get rid of the default light blue selection color
TAG : wpf
Date : October 15 2020, 11:12 AM , By : joyesong
WPF: Window stays minimized even when setting WindowState explicitly
WPF: Window stays minimized even when setting WindowState explicitly
Hope this helps I cross posted my question on the MSDN Forums and it got answered there. To quote the answer:
TAG : wpf
Date : October 15 2020, 01:19 AM , By : Holger Scharf
WPF: Drag/Drop to re-order grid and jiggle
WPF: Drag/Drop to re-order grid and jiggle
I hope this helps . I also ran across these, they might be helpful, though I'm not sure about the "make space for dragged item" behavior.http://code.google.com/p/gong-wpf-dragdrop/ which was originally on codeplex, here's part 1: http://www.codeproje
TAG : wpf
Date : October 15 2020, 01:19 AM , By : JoeTheGreenEye
Dynamically updating a WPF ListView after changes
Dynamically updating a WPF ListView after changes
Any of those help If your code is exactly as you show it, this is because you are creating a new ObservableCollection which is local to the Button_Click method, and letting it go out of scope. You need to either set the DataContext to the new collect
TAG : wpf
Date : October 15 2020, 01:18 AM , By : user3852392
WPF: How do I implement a stretch transform?
WPF: How do I implement a stretch transform?
I hope this helps you . You can either use the ScaleTransform and just apply it in one direction then combine it with a RotateTransform if the direction you need to stretch in isn't just plain x or y, or take a look at the Stretch property on the sha
TAG : wpf
Date : October 14 2020, 11:12 PM , By : user3852518
intercept RelativeSource FindAncestor
intercept RelativeSource FindAncestor
Does that help The most direct answerFindAncestor is processed internally by WPF and will search up the visual tree as far as it can before going anywhere else. Only when it reaches a Visual that has no visual parent will it search elsewhere, and thi
TAG : wpf
Date : October 14 2020, 01:41 PM , By : user3852789
WPF Listbox wont scroll Vertical
WPF Listbox wont scroll Vertical
it should still fix some issue As the name implies, ScrollViewer.HorizontalScrollBarVisibility="Disabled" disables horizontal scrolling. If you do that, but your ListBoxItems are too long, they'll get cut off. The StackPanel won't grow or shrink to f
TAG : wpf
Date : October 14 2020, 01:41 PM , By : George Vijay
WPF window on closing
WPF window on closing
Hope that helps Try overriding OnClosing in the window code behind. There you have a chance to stop the window from closing if you have something else to do by setting e.Cancel = true.
TAG : wpf
Date : October 14 2020, 01:07 PM , By : user3853344
WPF UserControl is not drawn when overriding MeasureOverride and ArrangeOverride
WPF UserControl is not drawn when overriding MeasureOverride and ArrangeOverride
like below fixes the issue Depending on how you are hosting your UserControl, the value returned from the Measure phase may not be used. If you have it setup in a Grid with star rows/columns or a DockPanel, then the final size may be completely diffe
TAG : wpf
Date : October 14 2020, 01:07 PM , By : user3853213
Master/Detail UI Best Practices?
Master/Detail UI Best Practices?
this will help I think the first two considerations can come down to preference. I'd prefer to have the first row selected and its details shown when the window first opens -- this tells me, as a user, how this window works. Not sure how it works in
TAG : wpf
Date : October 14 2020, 12:44 PM , By : JMK
shadow
Privacy Policy - Terms - Contact Us © bighow.org