2,325 questions
0
votes
1
answer
84
views
WPF MVVM use dependency property in its own UserControl xaml
I have a UserControl with a dependency property and its own ViewModel.
In xaml
<control:SelectInDataBaseControl DataContext="{Binding Property}" ForegroundColor="Both" />
...
0
votes
0
answers
65
views
Problem binding an inner user control property to an outer user control property [duplicate]
I am placing a user control inside a user control and I am having trouble binding the inner dependency property to an outer dependency property. I am using .NET 8. It is probably something stupid ...
0
votes
1
answer
58
views
How to apply background color to text in a TextBlock without affecting the entire TextBlock or using Run elements
I'm working with a TextBlock in WPF and need to apply a background color only to the text content without affecting the entire TextBlock. I don't want to use Run or Inline elements because this ...
0
votes
0
answers
61
views
Bindings not updated by DataContext updates
We are using MVVM for our WPF application, I have created an extension for ContentControl for a dialog footer, this footer contains buttons. We set the button commands from the ViewModel in the xmal ...
-1
votes
1
answer
98
views
Weird behavior with re-usable control and DependencyProperty
I'm trying to make a small POC of a re-usable control but i'm experiencing weird behavior that I can't for the love of god figure out why.
So I'm hoping anyone here can shed some light onto this.
I'm ...
0
votes
0
answers
26
views
How to visualize the dependency property of a user control in design
I have a couple of UserControls which I extend with Dependency Properties:
public static DependencyProperty CustomBrushProperty =
DependencyProperty.Register(
nameof(CustomBrush),
typeof(...
0
votes
0
answers
1k
views
Dependency 'androidx.appcompat:appcompat-resources:1.7.0' requires version 34 or later to compile
How to know a particular version of dependency can be compiled with a minimum/maximum version of Android SDK API version.
e.g. How to know Dependency 'androidx.appcompat:appcompat-resources:1.7.0' ...
2
votes
0
answers
277
views
How to exclude duplicated classes from a library which is added by the gradle dependency, in android?
I am developing an AR app using google sceneform library, I have added Sceneform library in the dependency, and also i have added google filament library version 1.21.1 as well.
implementation 'com....
1
vote
2
answers
78
views
Why does an Ellipse's Fill's ImageSource property, not accepting an ImageSource object type?
I have a DependencyProperty of type ImageSource named "Image".
public static readonly DependencyProperty ImageProperty = DependencyProperty.Register(nameof(Image), typeof(ImageSource), ...
0
votes
1
answer
229
views
TilePanel for Avalonia, `DependencyProperty` to `AvaloniaProperty`
I want a WrapPanel for Avalonia that wraps its content by placing the items next to each other, without spacing, just like in this article: https://www.codeproject.com/Articles/482501/TilePanel-An-...
0
votes
1
answer
112
views
how to Store/Map Complex data type using EF? [closed]
CategoryModel has a property & dependency-property Color of type Object Brush (Complex data type) that can't be Stored using EF directly so I use Serialization and store it as string.
using System....
0
votes
0
answers
37
views
Related Dependency Properties in the same UserControl
Consider the following scenario: a UserControl featuring two distinct dependency properties: Customer and Company. Linked to this control is a list of objects from a class, each possessing properties ...
0
votes
1
answer
64
views
Passing Property Values from Parent UserControl to Child's DependencyProperty
How to pass property (SomeProperty) from ParentUserControl context to DependencyProperty (MyDProperty) of the ChildUserControl?
In XAML, it should be: <uc:ChildUserControl MyDProperty="{...
1
vote
1
answer
164
views
WPF assign a Page to a Dependency Property
TL;DR: Binding a {StaticResource SomePage} to a DependencyProperty of type Page gives the error Microsoft.VisualStudio.XSurface.Wpf.Page is not a valid value for property...
Long Version
I am trying ...
0
votes
1
answer
67
views
How can I Two-Way bind the dependency property of a custom UserControl to the property of another UserControl's DataContext?
I have a UserControl who's code-behind has declared a dependency property. I also have another UserControl who is serving as the main UI.
The main UI usercontrol has set its DataContext to a viewmodel ...
-1
votes
1
answer
146
views
Unable to set my attached property unless it is in a style setter
I have an assembly with a custom Control class the defines an attached property.
public class LayerView : MultiSelector
{
public static readonly DependencyProperty PathStyleProperty =
...
0
votes
1
answer
67
views
WPF binding to custom control dependency property does not trigger property change
I am having trouble binding to a dependency property on a custom control.
This is my custom control. It's basically a textbox that only allows numeric input and exposes a "Value" dependency ...
0
votes
0
answers
63
views
ObservableCollection binded to another ObservableCollection does not fire CollectionChanged
I have ControlA hosting ControlB, both of them have DependencyProperty of type ObservableCollection, the nested control's (ControlB) property is binded to parent (ControlA) property, if something is ...
0
votes
1
answer
53
views
Update one Dependency Property based on another
I have a custom control I have set up in c#/wpf.
I am using Dependency properties for items, some of these are optional, but my current code seems very convoluted:
public class PopupMenu : ...
2
votes
1
answer
101
views
Why all TextBoxes in ItemsControl use the last dynamically-added ValidationRule?
I have a custom TextBox that adds MinMaxValidationRule when both Min and Max properties are set
public class TextBox2 : TextBox
{
public static readonly DependencyProperty MinProperty = ...
0
votes
1
answer
61
views
IsChecked binding for a checkbox inside a usercontrol is not fi [duplicate]
In the UserControl.xaml:
<UserControl x:Class="OurNameSpace.SystemCalibration.Controls.PortSelector"
xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
...
0
votes
1
answer
73
views
How can I bind a ValueRange Maximum and Minimum using Dependency property?
I'm working with a user control that includes a shared DataGrid used by multiple user controls. To customize the 'Maximum' and 'Minimum' values for each user control, I've implemented Dependency ...
0
votes
1
answer
873
views
@PropertySource returns 'Properties location not resolvable: (No such file or directory)'
I have a config file that is meant to use @PropertySource to set values. However it seems like it is not working (below)
@Configuration
@PropertySources({
@PropertySource(value = "file:/...
0
votes
0
answers
375
views
Maven Friendly version is not working in multimodule setup
I have Maven multi module project where i have hardcoded the pom version in main pom and all of the child pom's as well. But am trying to use the maven-ci-friendly-version to my project.
So i have ...
0
votes
2
answers
100
views
Binding problems between an usercontrol and its parent (another usercontrol) MVVM
I am creating an UserControl with 2 RepeatButtons and one TextBox. So problems begin when i want to Bind some properties....
FYI i am using Caliburn.micro as Framework..
i need to have the value of ...