Telerik Forums
UI for WPF Forum
0 answers
233 views

Hi, i'm having a rough fight with WPF and its Binding system. I just wanna bind a property of an instance called HPP, this property is pressure and this object exist in MainViewModel, so in MainWindow.xaml a have this:


<componentes:SetComponent x:Name="HPP_Trip_Route" Grid.Row="1" Grid.Column="1" VerticalAlignment="Top" Title="TRIP" VariableValue="{Binding HPPRoute.Pressure}" Unity="PSI" Loaded="SetComponent_Loaded" FSizeTitle="24" FSizeVariable="36" FSizeUnity="14"/>
In SetComponent:
<TextBlock x:Name="ValueSetComponent" Grid.Row="1" Text="{Binding VariableValue, RelativeSource={RelativeSource AncestorType=UserControl}}" FontSize="{Binding FSizeVariable}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Foreground="#FFFFFF" Margin="0, 5, 0, 5 "/>
Dar clic y arrastrar para mover
In MainWindow.xaml.cs:

public partial class MainWindow : Window, INotifyPropertyChanged
    {
        private readonly Variables GV = Variables.GetInstancia();
        private MainViewModel _mainViewModel;
        public MainViewModel MainViewModel
        {
            get { return _mainViewModel; }
            set
            {
                _mainViewModel = value;
                OnPropertyChanged();
            }
        }

        public MainWindow()
        {
            InitializeComponent();
            GV.MainViewModel.StartAssign(GV);
            MainViewModel = GV.MainViewModel;
            GV.MainViewModel.MainWindow = this;
            DataContext = MainViewModel;
     
        }
        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }

I tried with RelativeSource without success. If i create a variable in MainViewModel it works. Any help?

Fenix
Top achievements
Rank 1
 asked on 12 Jul 2023
1 answer
218 views
I have a Radgridview with merged cells. When I select a merged cell, the selected row in the ViewModel does not change. I need to get all rows whose cells are included in the selected merged cell. Can it be done?
Dinko
Telerik team
 answered on 11 Jul 2023
1 answer
240 views

We use RadCombobox (WPF) for loading more than 20000 items.

We enabled the following properties and removed the Virtualization properties. We are facing performance problems on searching the items from RadCombobox element. How can we improve performance for the RadCombobox load and search, if virtualization properties cannot be used.

<telerik:RadComboBox
x:Name="itemBox"
HorizontalAlignment="Stretch"
CanAutocompleteSelectItems="True"
DisplayMemberPath="Name"
EmptyText="Select the item"
IsEditable="True"
IsFilteringEnabled="True"
IsTextSearchEnabled="True"
ItemsSource="{Binding ItemCollection, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
OpenDropDownOnFocus="True"
ScrollViewer.VerticalScrollBarVisibility="Auto"
SelectedItem="{Binding SelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
TextSearch.Text="Name"
TextSearchMode="Contains" />
Dinko
Telerik team
 answered on 10 Jul 2023
1 answer
161 views

Hello! I need to merge cells in all columns. In my example, the screenshot shows that Sam in the "Name" column is merged for two different people who are part of different companies. Is it possible to make the cells merge based on the columns on the left? That is, if Sam is part of different companies, then he does not need to be merged.
What I want is in the attachment

Martin Ivanov
Telerik team
 answered on 10 Jul 2023
1 answer
224 views

Hi

Is it posible to add a custom button to the pdfviewer toolbar in UI for WPF?

 

 

Dinko
Telerik team
 answered on 07 Jul 2023
1 answer
381 views

Hello,

 

I have a RadMaskedTextInput that I'm using for a phone number.

 

If I clear the form, and set the txtDriverNumber (that's the name of the field) using txtDriverNumber.Text = "" (and I also tried string.Empty) it looks like it clears the value correctly.


However, when the textbox gets focus again, it puts back in the last entered data.  I don't want it to do that, is there something I can do to make sure it doesn't remember previous values?

Stenly
Telerik team
 answered on 06 Jul 2023
10 answers
437 views
I've got a WebBrowser control nested inside a RadPane ... I've pointed it at http://loremipsumtext.com/ for some dummy content.  The content shows fine when pinned...but the RadPane is blank when simply floating.

Any suggestions?
Ehsan
Top achievements
Rank 1
Iron
 answered on 04 Jul 2023
0 answers
168 views

I am using Telerik RadGrid control in my ASP.NET web application. Grid columns are generated automatically from the data source. Also Grouping, sorting, Filtering, Aggregates etc are enabled for the columns in the grid. When I save the Grid setting I can see in the saved xml content that it also persists Aggregate function which was applied to the columns. The value of  XML node "PersistableColumnSetting>Aggregate" is "SUM"

but when I revisit the page next time, I notice the Aggregate functions are not applied to the column after loading the settings and rebinding the grid.

I wonder if this is by design or there is another way to apply the Aggregates to the columns just like they were when saving the settings

 

Thanks

Harshad

 

Harshad
Top achievements
Rank 1
 asked on 04 Jul 2023
1 answer
129 views
Hi I'am begginer with telerik and I'am using Radshapes and I want to avoid overlap between them can you help me how to do it and thanks
Martin Ivanov
Telerik team
 answered on 03 Jul 2023
0 answers
214 views

Hello,

I have a RadComboBox that looks like this:

<telerik:RadComboBox Command="{Binding ResourceDropDownClosedCommand}"
                     ItemsSource="{Binding ResourceLookupData}"
                     AutoCompleteSelectionMode="FullMatch"
                     telerik:TextSearch.TextPath="Id"
                     AllowMultipleSelection="True"
                     UpdateTextOnLostFocus="False"
                     IsEditable="True"
                     TextSearchMode="Contains"
                     IsFilteringEnabled="True"
                     telerik:StyleManager.Theme="Windows7"
                     Grid.Column="3" Grid.Row="1">

    <telerik:RadComboBox.ItemTemplate>
                            
        <DataTemplate>
            <Grid Width="500">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="85"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>

                <TextBlock Grid.Column="0" Text="{Binding Path=Id}" />
                <TextBlock Grid.Column="1" Text="{Binding Path=ResourceDescription}"/>
            </Grid>
        </DataTemplate>
                            
    </telerik:RadComboBox.ItemTemplate>

    <telerik:RadComboBox.FilteringBehavior>
        <controlsHelpers:RadComboBoxResourceLookupFilteringBehavior />
    </telerik:RadComboBox.FilteringBehavior>

    <i:Interaction.Behaviors>
        <controlsHelpers:RadComboBoxSelectedItemsBehavior SelectedItems="{Binding SelectedResources}" />
    </i:Interaction.Behaviors>
                        
</telerik:RadComboBox>

The problem i am facing is that after the user has entered text and the RadComboBox has filtered the Items depending on the entered text, after losing focus of the RadComboBox by tabbing or clicking away, If there is no item that matches the entered text then the text is cleared, even with the UpdateTextOnLostFocus set to False.

I haven't been able to find a solution that works for me. So any suggestions would be appreciated.

Thank you

Marko
Top achievements
Rank 2
Iron
 asked on 29 Jun 2023
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?