Questions tagged [uielement]

UIElement is a base class for most of the objects that have visual appearance and can process basic input as part of the user interface.

404 questions
6
votes
1 answer

WPF UIElement refresh bug?

I have a custom panel, which is used to draw selection effect; but sometimes it does't clear the previous rectangles, if the mouse is moved back and forth when the screen is big enough(across two monitors), is it a WPF bug or limitation? Do you know…
Hiber
  • 464
  • 3
  • 11
5
votes
1 answer

Dynamic TextSize in WPF UIElements

As suggested I allow all of my WPF UIElements to have a dynamic size so they can be resized easily however, in TextBlocks I have to specify the size of the Font. This means when the element's size increases or decreases the Font size stays the same.…
James
  • 3,597
  • 11
  • 47
  • 57
5
votes
1 answer

How do I reset the DesiredSize on a UIElement

I have a list box that contains any number of UIElements whose size are unknown. I want to be able to track the proposed size of the list box after each item has been added. This will allow me to split a large list (ex: 100 items) into several (ex:…
Michael
  • 3,099
  • 4
  • 31
  • 40
5
votes
2 answers

Adding and removing WPF UIElements at runtime

Is there a way to logically group or tag UIElements like shapes and controls added at runtime for easy removal? For eg., I have a Grid with some (design-time) child elements and add Ellipses and TextBlocks to it at runtime. When I want to draw a…
Ra.
  • 289
  • 1
  • 3
  • 16
5
votes
1 answer

Should I create a new method to handle the event or override the base method?

I'm using a class derived from UIElement class when writing a UWP program using C#, where I want to include handling input controls such as mouse and keyboard actions. Now I see there are already virtual methods that says OnSomeEvent() and clearly I…
5
votes
2 answers

JavaFX application hide OSX dock icon

I need to hide the dock icon of my javafx application. In a normal java application this can be achieved by the following property: System.setProperty("apple.awt.UIElement", "true"); However, this does not seems to work with JavaFX. Thanks!
tuna
  • 305
  • 6
  • 13
5
votes
1 answer

How to Detach a Behavior from an UIElement in Code Behind for Silverlight?

In Silverlight 3.0 I have added a custom behavior to some UIElement in Code Behind. I wanted to remove the Behavior later in runtime. What is the C# syntax to Detach an already added Behavior from an UIElement?
kanchirk
  • 912
  • 2
  • 13
  • 29
5
votes
3 answers

Copy UI element with adorner

I am working on taking screenshot of UI Element (WPF) in various size and i'm able to achieve this using "RenderTargetBitmap. But the UIElement which has an Adorner part is not coming while take copy. What should i do to achieve this. Any reference…
Mohanavel
  • 1,763
  • 3
  • 22
  • 44
4
votes
0 answers

RichTextBox crashed when insert UIElement into it

When I insert a UIElement into RichTextBox (such as a Button in BlockUIContainer)。I always got an InvalidOperationException said "This TextNavigator No Scoping Text Element" when I edit the richtextbox(especially select elements including…
Simon. Li
  • 404
  • 2
  • 11
4
votes
1 answer

Difference between UIElementCollection and Collection?

In WPF and Silverlight, we have seen the following classes: UIElementCollection ItemCollection RowDefinitionCollection ColumnDefinitionCollection PointCollection and a lot more.... Why do they have these classes, one class for each type? Why did…
Nawaz
  • 353,942
  • 115
  • 666
  • 851
4
votes
3 answers

Adding UIElement with AddLogicalChild, AddVisualChild in WPF

I created a custom version of canvas by simply extending/inheriting from the Panel. When I want to draw or render something on it, I simply create a DrawingVisual, draw the desired graphics and call the AddLogicalChild(Visual),…
grizzly
  • 1,146
  • 12
  • 26
4
votes
1 answer

How do I make a Deep Copy of a UIElement?

So I have a printing component that serves a Silverlight application. Other modules in this program have the ability to signal the printing component and pass it a UIElement, which the printing component will then draw to the screen. All well and…
GWLlosa
  • 23,995
  • 17
  • 79
  • 116
4
votes
1 answer

Getting the UIElement from an animation completed event

From my codebehind I want to start an animation on a specific UIElement, when that animation ends I would like to do some other processing on that UIElement. I am having trouble figuring out how to convert the AnimationClock object that I receive as…
4
votes
0 answers

DocumentPaginator that works with any Visual?

Printing any visual is easy. Printing one that is larger than a single page is hard. I'm stuck. The docs are scarce and I've gotten as far as I can. I'm wondering if anybody has a class which extends DocumentPaginator that can take any visual (or…
user1228
4
votes
2 answers

WPF Screenshot JPG from UIElement with C#

I'm trying to create a JPG from part of my WPF Applications. Like a screenshot, only of individual UIElements. I started here: http://www.grumpydev.com/2009/01/03/taking-wpf-screenshots/ I am using his extension method, which essential allows you…
Adam S
  • 8,945
  • 17
  • 67
  • 103
1 2
3
26 27