Hello,
I am relatively new to WPF and I have an issue with Adorners.
I have an inkcanvas that contains an image, I can save the image with the strokes added by the user. The issue I have is that I have a requirement that allows the user to add text over the image, and to print/save the text without damaging th image.
I used an ador...
Hello all,
In a WPF UserControl, I have to make to call to a WebService. I am making this call on a separate thread but I want to inform the user that the call may take some time.
The WebMethod returns me a collection of objects and I bind it to a ListBox in my UC. So far, so good... This part works really well. However, I want to dis...
WPF validation system performs intial validatation of an object (I mean - all fields are validated when a databound item is changed, and results are displayed on the ui).
But it doesn't work like this, when I add a control dynamically. In such case inital validation happens, but results aren't shown on the ui. Only after some properties ...
I'm using an Adorner in .NET 3.5, and I'm able to draw by overriding OnRender, but I need the ability to redraw the adorner to change its appearance.
Essentially I'm looking for a way to clear the drawing context and call OnRender again. What's the best way to do this, or is there a better approach?
public class MyAdorner : Adorner
{
...
Original question: Does an Adorner automagically inherit the "DataContext" of its "AdornedElement" in WPF?
...
We have a WPF application that has custom windows on a canvas which in turn contain custom controls (the main canvas containing the custom windows is again custom control displaying stuff). So basically the visual tree looks like this (without implicit Borders and other things):
- Windows
- Canvas
- WindowMgr
- CustomWindow ...
When I host WPF controls that use adorners (the error border of the textbox) in a HwndSource the adorners are not shown. It seems that the adorner layer is not there. Why is that so and what can I do against it? Is this a known bug?
...
Hi,
I am building a control, where the user can "draw" resizable rectangles that are laid over the content. To resize those rectangles, I use an Adorner on top of them which contains 4 Thumbs to change the size of the rectangle.
The problem is, that this control is is "zoomable", meaning a ScaleTransform is applied to the whole control...
Hi,
I have an ItemsControl in a ScrollViewer. The items in the ItemsControl are expanded to a DataTemplate which basically consists of an Adorner.
Now the problem is, when scrolling, the Visual Children of the Adorner are visible outside the ScrollViewer. Lets say I scroll from the Horizontal Offset 0 to 100, the Visual Children of the...
I made the example below which enables a factory to pack objects with functionality, but the problem is that the functionality is divorced from the object.
My ultimate goal is attach functionality such as log, and save and display which operates on the specific properties that each different object has.
How would I keep the exterior a...
Hi there!
Here is the case:
<DataTemplate x:Key="ItemTemplate"
DataType="local:RoutedCustomCommand">
<Button Command="{Binding}"
Content="{Binding Text}"
ToolTip="{Binding Description}">
<Button.Visibility>
<MultiBinding Converter="{StaticResource SomeConverter}">
...
Hello,
I'm creating a Loading Adorner that has a swirling icon over it. I tried binding the visibility property directly in the XAML but that actually hides everything inside its hierarchy.
I have this in my XAML:
<AdornerDecorator Visibility="{Binding Path=RootGroup.Loading, Converter={StaticResource VisibilityConverter}}">
<TreeV...
Hi,
I am trying to position an Adorner depending on the dimensions of the parent of the adorned element. For example, I have a textbox. I want to adorn this textbox so it looks something like this:
A textbox is placed in a canvas object and if there is enough space available then place the adorner (semi transparent rounded square) i...
I'm using an adorner to show a 'ghost' of the element being dragged...
var adornerLayer = AdornerLayer.GetAdornerLayer(topLevelGrid);
dragAdorner = new DragAdorner(topLevelGrid, itemToDrag);
adornerLayer.Add(dragAdorner);
dragAdorner.UpdatePosition(e.GetPosition(topLevelGrid));
DragDrop.DoDragDrop(sourceItems, viewModel, DragDropEffect...
I'm trying to decorate an ItemsControl so that each item will have a Delete button that floats over the item's content under a specific condition inspired by somewhat by the iPhone UI. I have a few ways in mind of how I can approach this but I could use some guidance from other WPF folks who might have a better idea about how this would ...
Hello,
I have a canvas (Panel Control) in my WinForms app where users can drag things like textbox's, labels etc around. But I want to make it easier for them to more precisely align the objects. I've read into it and Adorners seem to be the way to go? But, apparently it's only for WPF. WPF is not an option for me, unfortunately.
What ...
I'm using the System.Windows.Controls.WebBrowser for various things in my app and I've noticed that adorners are cut off when they are supposed to appear over a WebBrowser. I realize that the WebBrowser control is really a wrapper around a COM component and probably renders differently, but I wondered if anyone figured out how to solve ...
Hi,
I have a WPF Window that contains a ContentPresenter that has Height and Width set to 0 by default.
When a user clicks a button, I run an animation to transform the ContentPresenter's Height and Width properties to 896,1024 (actually it does 3 rotations whilst its growing, too) and this is all good...
The DataContext for the User c...
Is there any way to make WPF adorner ignore mouse entirely so that the UIElement behind the adorner still gets mouse events as if the adorner does not exist?
...
In a UI I'm building, I want to adorn a panel whenever one of the controls in the panel has the focus. So I handle the IsKeyboardFocusWithinChanged event, and add an adorner to the element when it gains the focus and remove the adorner when it loses focus. This seems to work OK.
The problem I'm having is that the adorner isn't getting...