Telerik Forums
UI for WPF Forum
1 answer
392 views

 

I have a requirement to override the Minimize function of the radWindow (clicking the Minimize Button on the Title Bar). Instead of the Window Minimizing to the bottom left of the screen I intend to simply reduce the Height of the Window leaving just the Title Bar showing (in its original position). Restoring the Window will again simply set the Height back to its original value to expand the Window….

So, I need to set Handle = true when the SC_MINIMIZE Message is received, this will prevent the Window from minimizing, then i can implement my own code to change the Height of the Window… This is the code so far…

        private void RadWindow_HostCreated(object sender, HostWindowCreatedEventArgs e)

        {

            e.HostWindow.SourceInitialized += HostWindow_SourceInitialized;

        }

 

        private void HostWindow_SourceInitialized(object sender, EventArgs e)

        {

            var source = PresentationSource.FromVisual((Window)sender) as HwndSource;

            if (source != null) source.AddHook(new HwndSourceHook(HandleMessages));

        }

 

        private IntPtr HandleMessages(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)

        {

            if (msg == 0x0112 && ((int)wParam & 0xFFF0) == 0xF020)

            {

                handled = true;

            }

 

            return IntPtr.Zero;

        }

 

However, while I seem to be catching Windows Messages in the HandleMessages function, it is not setting handled = true; when i click the Windows Minimize Button

Any help would be appreciated…

Martin Ivanov
Telerik team
 answered on 10 Nov 2021
1 answer
355 views

Hi (QwQ),

I met a problem that "IsReadOnly=true" of GridViewDataColumn doesn't work.

<telerik:GridViewDataColumn Header="IsChecked" DataMemberBinding="{Binding IsChecked}"
                        Style="{DynamicResource GridViewColumnStyle}" IsReadOnly="True">
    <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate>
            <CheckBox IsChecked="{Binding IsChecked}" Style="{DynamicResource CheckBoxStyle}"/>
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>
I can still edit the checkbox in column.
Stenly
Telerik team
 answered on 09 Nov 2021
1 answer
445 views

Hi(=^_^=),

I have set the Style and EditorStyle of GridViewCheckBoxColumn.

Here it is:

<telerik:GridViewCheckBoxColumn Header="IsChecked1" 
DataMemberBinding="{Binding IsChecked}"
Style="{DynamicResource GridViewColumnStyle}" 
EditorStyle="{DynamicResource CheckBoxStyle}">
</telerik:GridViewCheckBoxColumn>

But the CheckBoxStyle only works when it is being edited.

Like this:

So..Which style can i set to change the normal style of checkbox?

Martin Ivanov
Telerik team
 answered on 09 Nov 2021
1 answer
156 views

Hello,

In my WPF application I want to integrate a page indicator, like everybody knows from mobile devices, to browse/slide through e.g. some images or pages/controls and the dots at the bottom indicating the current position.

I saw that Telerik provides something like that for Xamarin (SlideView: https://docs.telerik.com/devtools/xamarin/controls/slideview/slideview-overview). 

Is there something similar for WPF I just don't see? Or any suggestion how I can realize this easily (e.g. with bit of restyling of another control)? Or maybe is it possible to host Xamarin control in WPF?

 

Thanks

Martin Ivanov
Telerik team
 answered on 09 Nov 2021
0 answers
207 views

Hi,

I just upgrade my solution from telerik wpf 2021.1.325.310  to 2021.3.914.45. I performed the wizard upgrade but after restart vs2019, and rebuild of solution I get runtime exceptions like this: 
'The invocation of the constructor on type 'Telerik.Windows.Controls.RadBusyIndicator' that matches the specified binding constraints threw an exception.' Line number '50' and line position '3'.
If I delete RadBusyIndicator:

''The invocation of the constructor on type 'Telerik.Windows.Controls.RadNotifyIcon' that matches the specified binding constraints threw an exception.' Line number '56' and line position '5'.'

And so on...
I restored old version and I'm waiting for help.
Thank you

Luigi

 

Luigi
Top achievements
Rank 3
Bronze
Iron
Iron
 asked on 09 Nov 2021
0 answers
165 views

I use diagram each Tab Item.

And I tried save & load diagram.

it worked. but, connection's Source/Target is null when I change the tab.

then I checked DeserializeLink in GraphSource.

'base.DeserializeLink(connection, info)' is not return Source/Target.

Help me,,,

 

in GraphSource.

public override void SerializeLink(Link link, SerializationInfo info)
        {
            this.ClearCache();
            base.SerializeLink(link, info);
        }
        public override Link DeserializeLink(IConnection connection, SerializationInfo info)
        {
            return base.DeserializeLink(connection, info);
        }
kim
Top achievements
Rank 1
Iron
 asked on 09 Nov 2021
1 answer
577 views

Hello Forum!

I have the following method in a RadGridView-behavior which expands all groups in my RadGridView (just like method ExpandAllGroups()):


      private static void onExpandAllCommandBoolChanged( DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs )
      {
         var radGridView = ( (RadGridViewExpandAndCollapseAllGroupingsCommandBehavior) dependencyObject ).AssociatedObject;

         var groups = radGridView?.Items.Groups;
         if( groups == null )
            return;
         foreach( var group in groups )
         {
            radGridView.ExpandGroup( (IGroup)group );
         }

         // easier: ((RadGridViewExpandAndCollapseAllGroupingsCommandBehavior)dependencyObject).AssociatedObject.ExpandAllGroups();
      }

My task is to expand the same RadGridView-groups after a reload of the RadGridView-data that were expanded before the reload.
To accomplish this, i need the IsExpanded-property of the RadGridView-group, but it isn't available in type Group.

Which datatype can I use to get the IsExpanded-property?
I use WPF and MVVM.

Thank you!

Martin Ivanov
Telerik team
 answered on 08 Nov 2021
4 answers
311 views

Hello, 

I'm new to WPF but have been developing software for more than 22 years (vast majority has been in C#).

I'm looking for information on how to properly format the CardView's CardHeaderTemplate. I'd like to be able to put a line break between two pieces of data:

Table # 5

Guests 3

Following is my xaml:

                <telerik:RadCardView CardLayout="Rows" 
                                     Height="Auto" Width="Auto" 
                                     ItemsSource="{Binding PartyCards}" 
                                     CardHeaderBinding="{Binding Path=.}" 
                                     AutoGenerateDataFieldDescriptors="False" 
                                     IsReadOnly="true">
                    <telerik:RadCardView.CardHeaderTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="Table # " FontWeight="Bold" Foreground="White" />
                                <Label Content="{Binding TableNumber}" FontWeight="Bold" Foreground="White" />
                                <Label Content="Guests " FontWeight="Bold" Foreground="White" />
                                <Label Content="{Binding GuestCount}" FontWeight="Bold" Foreground="White" />
                            </StackPanel>
                        </DataTemplate>
                    </telerik:RadCardView.CardHeaderTemplate>

                    <telerik:RadCardView.DataFieldDescriptors>
                        <telerik:CardDataFieldDescriptor Header="" DataMemberBinding="{Binding OrderItems}" />
                    </telerik:RadCardView.DataFieldDescriptors>
                </telerik:RadCardView>

Much appreciated!!

-Mark

The Nimble Coder
Top achievements
Rank 2
Iron
 answered on 07 Nov 2021
1 answer
337 views

We have some performance problems with a large RadDiagram (in one case, there are 372 shapes and 1200+ links, for instance).

While doing some performance profiling, I notice that a great deal of time is spent in RadDiagramConnectionAutomationPeer.GetItemStatusCore and RadDiagramShapeAutomationPeer.GetItemStatusCore.  Both of these are calling an AutomationXmlSerializer.Serialize method that takes a the vast majority of the time.  This is going on when the diagram is just sitting there with no interaction going on, no changes happening, etc. -- just displaying.

I don't think we've done anything to serialize the diagram intentionally.  For instance, I see there is a RadDiagram.Save() method; we are not calling that anywhere, and I can't find it in any of the call history.  I also don't see any of our calls leading to these GetItemStatusCore calls, so I'm thinking it's being triggered implicitly somehow.

What are we doing that's triggering this serialization?  Is it a critical part of the function of RadDiagram?  Since it's causing performance problems, is there anything we can do about it, please? 

I also don't (think I) see any documentation for these classes or methods online (or, internet searches turn up nothing for them), so I'm not sure how to proceed on my own.

This is with v. 2021.1.325.40.

Thanks!

-David Marshburn

David
Top achievements
Rank 1
Iron
Iron
 answered on 06 Nov 2021
1 answer
200 views

I'm getting an exception when closing panes with no title:

System.ArgumentNullException
  HResult=0x80004003
  Message=RadPane instance cannot be null. Make sure that override of DockingPanesFactory.GetPaneFromItem method returns a valid RadPane instance.
Parameter name: pane
  Source=Telerik.Windows.Controls.Docking
  StackTrace:
   at Telerik.Windows.Controls.Docking.DockingPanesFactory.RemovePane(RadPane pane)
   at Telerik.Windows.Controls.RadDocking.OnPanesSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)

We don't have an override of DockingPanesFactory.GetPaneFromItem so I'm not clear what's going wrong here? Is a pane parameter being passed that's null?

This occurs when we execute 'close all but this pane" type operation.

Dilyan Traykov
Telerik team
 answered on 05 Nov 2021
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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?