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
1
vote
2 answers

iOS get which uielement invoked UIKeyboardWillShowNotification

In my iOS app I have several UIElements that can process user input: textfields, editable webviews, etc. each time I write something into these UIElements the keyboard (obviously) will come up. Before it happens I can catch this event by observing…
Zoltan Varadi
  • 2,468
  • 2
  • 34
  • 51
1
vote
1 answer

How to implement WPF User Control with UIElement dependency properties?

I have a user control with this code behind: /// /// The text to use for the header. /// public UIElement HeaderText { get { return (UIElement) GetValue(HeaderTextProperty); } set { SetValue(HeaderTextProperty, value);…
Tower
  • 98,741
  • 129
  • 357
  • 507
1
vote
3 answers

How to make margin be relative to the center of the UIElement and not its top-left corner in a Grid?

I'd like the Margin property to reference the center of the UIElement and not the top-left corner. That way when I change the width/height of the UIElement it stays in the same spot. Is there a way to configure this behavior or I'll have to rely on…
Nock
  • 6,561
  • 1
  • 28
  • 27
0
votes
2 answers

How can I make a UIElement show after collapse in upper direction?

On my form, I have a TextBlock element that initially is collapsed. (TextBlock.Visibility = Visibility.Collapsed). When some error occurred, it should be shown. When I use TextBlock.Visibility = Visibility.Show, all the controls that are situated…
0
votes
1 answer

Determine location of a UIElement on a Canvas

I have spent 20 minutes trying to find an example in C# of how to draw a line between two rectangles, and I can't find anything. I don't know if I just don't understand the paradigm of drawing 2D shapes in Silverlight, or if I'm just looking in the…
Dan Wolchonok
  • 1,930
  • 1
  • 21
  • 21
0
votes
0 answers

Get transformed values of a UiElement in WPF app using .net 3.5

How can I get the transformed values of a UIElement without adding it to the visual tree in .net 3.5 in WPF? Achievement: A UIElement (Canvas) contains a transformation matrix and several Paths (Shapes) as content. How can I get the transformed…
Beachwalker
  • 7,685
  • 6
  • 52
  • 94
0
votes
1 answer

Silverlight databinding to locate UIElements

Is it possible to locate UIElement(s) on the visual tree in silverlight by inspecting the databinding somehow for a business object being bound. What I want to do is locate elements using a lambda expression (or any other means) from the element…
almog.ori
  • 7,839
  • 1
  • 35
  • 49
0
votes
1 answer

Windows Phone 7 UIElement manipulation

I want to accomplish the following scenario. I have a UIElement with a CompositeTransform which I want to drag around the screen. Plus, when I’m tapping on it, I want it to rotate by 90 degrees. So, I’m…
0
votes
2 answers

Hit testing with new UIElements

I am creating a WPF-usercontrol that needs to check that new UIElements does not overlap with any existing UIElements. The code below works fine when the baseRectangle is added to canvas before the call to button1_Click, but if the rectangle is…
Jargo
  • 365
  • 1
  • 4
  • 16
0
votes
1 answer

How to get UIElement at specific position in ItemsControl in WP7?

I filled the icBoard with 50 Cell objects, so each Rectangle object has Cell as data object. Now, I want according to index or cell object to get the corresponding Rectangle element. For example I want to get the Rectangle in index=15. Not it's data…
theateist
  • 13,879
  • 17
  • 69
  • 109
0
votes
1 answer

Silverlight deep copy of a UIElement using PropertyInfo's SetValue?

I have a RadComboBox from telerik which has some protected setters for a few of it's properties. I want to be able to set each and every property so I derived from that control and I have created a custom control. I also did the same thing for it's…
asuciu
  • 1,234
  • 2
  • 21
  • 35
0
votes
1 answer

Binding UIElement to local Data

I am having a class "BoolValue" where i declare a bool value and convert this into Dependency Property(Hope me had done that correct) Now in xaml where im having a checkbox wants to check/uncheck depending on bool value. Me attching the whole code…
Dheeraj
  • 69
  • 1
  • 9
0
votes
1 answer

Grid.Add.Children(UIElement) returns Parameter is incorrect exception

I am trying to add border in two pivot items. When my border is added to grid in pivot item for the first time everything is working fine. But when i try to add border second time in same pivot item it throws an exception "The parameter is…
Mohit
  • 415
  • 2
  • 18
0
votes
2 answers

How to show UIElements hidden by keypad in iOS5?

In iOS 5 iPad supports 3 different keypads(normal, split, move-up). Previously when keypad appears controller will be notified though KeyboardDidShowNotification. Here, if we have any UI elemtns hidden by keypad will set an offset and push the…
durai
  • 903
  • 2
  • 12
  • 21
0
votes
1 answer

Unable to set Button Background in RichTextBox

I have a RichTextBox to which I add a Button in code... I can set the Button's Foreground but not the Background. Button b = new() { // Unspecified width and button fills width Content…
TreeDragon
  • 11
  • 4