I feedback the question,but it is not still resolve,so when i got the old source code,
after i deal with the gridview column resize,i found the question code:
in ChromelessWindowHelper.cs file:
modify the function HandleMoving(IntPtr hwnd, IntPtr wParam, IntPtr lParam, out bool handled):
just none the following code:
//NativeMethods.CopyToRECT(position, ref currentPosition);
so it is OK! i think when coordinate transform from int type to double type and then from double type to int type,
at last,there is the offset.
We use RadSpreadsheet control to display spreadsheet. We use protection mode and do not allow user to change the content.
If user tries to change content, the control displays error message: "The cell you are trying to change is on protected sheet. To make change, unprotect the sheet."
We will like to suppress this message as the style is not one used by our application. Also application does not allow user to modify worksheet.
How can we suppress message? Thanks.
I have a RadComboBox with a ListCollectionView with grouping.
My problem is that the scrollviewer scrolls between the groups, not the items...
Pressing the down/up keys correctly moves thru the items, but scrolling (either clicking or with wheel) moves thru the groups.
Some groups may have more items than will fit in the dropdown and it's very hard to see and select them.
I need to change this. How?
Jurgen
I have a chart with an AreaSeries and a DateTime horizontal axis. I want to set a different color on certain points in the series, so that it looks for example like this: https://i.imgur.com/yycLv4v.png
How can I achieve this?
I am using the very latest UI for WPF release (R3 for 2018). The release notes said that RadMultiColumnComboBox was available for use, albeit in beta. I wanted to try it but I cannot figure out where it is.
I tried replacing my XAML "<telerik:RadComboBox> tag with "<telerik:RadMultiColumnComboBox>" but Intellisense didn't know about it.
My current assembly references the following:
Telerik.Windows.Controls
Telerik.Windows.Controls.FileDialogs
Telerik.Windows.Controls.Input
Telerik.Windows.Controls.Navigation
What assembly am I missing? I've tried searching the docs but I can't see anywhere they're telling me what assembly to reference
Hello,
I have put together a small sample application which is a cut down version of my main application, both the sample application and main app are suffering from similar inconsistent flyout pane behaviour.
If I click on the collapsed "Search" pane and then one of the grid's hyperlinks. It collapses immediately - this is a show stopper in my main application for when the search pane is collapsed.
If I mouse hover on the search and don't click - I can click then click on the grid hyperlinks correctly - this is the same behaviour I want when the user clicks the search button.
These are the main issues I'm facing - I can live with the behaviour presented by the toolbar and the datagrid context menu but ideally I want the pane to stay expanded while I interact with the context menu's
Any advice would be appreciated.
MainWindow.xaml:
<Window x:Class="DockHidingIssue.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:dockHidingIssue="clr-namespace:DockHidingIssue"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d"
Title="MainWindow" Height="768" Width="1024" d:DataContext="{d:DesignInstance dockHidingIssue:MainWindow}">
<Window.Resources>
<MenuItem x:Key="one" Header="First" Click="One_OnClick" />
<MenuItem x:Key="two" Header="Second" Click="Two_OnClick" />
<MenuItem x:Key="three" Header="Third" Click="Three_OnClick" />
<ContextMenu x:Key="GridContextMenu">
<MenuItem>Click me</MenuItem>
</ContextMenu>
</Window.Resources>
<Grid>
<telerik:RadDocking Background="White" x:Name="MainDock"
telerik:RadDocking.SerializationTag="ParentDockContainer">
<telerik:RadDocking.DocumentHost>
<telerik:RadSplitContainer telerik:RadDocking.SerializationTag="HomePageContainer">
<telerik:RadPaneGroup BorderBrush="{x:Null}" BorderThickness="0"
telerik:RadDocking.SerializationTag="HomePageGroup">
<telerik:RadDocumentPane CanFloat="False" Visibility="Collapsed" CanUserClose="False"
telerik:RadDocking.SerializationTag="MainPane">
<WebBrowser x:Name="Browser" />
</telerik:RadDocumentPane>
</telerik:RadPaneGroup>
</telerik:RadSplitContainer>
</telerik:RadDocking.DocumentHost>
<telerik:RadSplitContainer InitialPosition="DockedBottom"
telerik:RadDocking.SerializationTag="SearchContainer">
<telerik:RadPaneGroup telerik:RadDocking.SerializationTag="SearchGroup">
<telerik:RadPane Header="Search" x:Name="SearchRadPane"
telerik:RadDocking.SerializationTag="SearchPane"
CanUserPin="True" IsPinned="False" MouseEnter="SearchRadPane_OnMouseEnter">
<TabControl TabStripPlacement="Bottom">
<TabItem Header="Search">
<StackPanel>
<ToolBar x:Name="tbSelectorControl" ToolBarTray.IsLocked="True"
KeyboardNavigation.TabNavigation="Continue"
VerticalAlignment="Center" VerticalContentAlignment="Center">
<Menu TabIndex="0" SnapsToDevicePixels="True" Background="Transparent">
<Menu.Resources>
<Style TargetType="MenuItem"
BasedOn="{StaticResource {x:Type MenuItem}}">
<Setter Property="Command"
Value="{Binding Path=Command, FallbackValue={x:Null}}" />
</Style>
</Menu.Resources>
<MenuItem x:Name="mnuSelected" SubmenuOpened="MnuSelected_OnSubmenuOpened">
<MenuItem.Header>
<StackPanel Orientation="Horizontal" Height="30">
<Label x:Name="txtSelectedFinder" Content="Selected Finder"
Height="30" />
<Image Height="8" Width="8"
Margin="8,0,0,0" />
</StackPanel>
</MenuItem.Header>
<MenuItem Header="Test" />
</MenuItem>
</Menu>
<Separator />
</ToolBar>
<DataGrid ItemsSource="{Binding Data}" AutoGenerateColumns="False"
ContextMenu="{StaticResource GridContextMenu}"
ContextMenuOpening="FrameworkElement_OnContextMenuOpening">
<DataGrid.Columns>
<DataGridTextColumn Header="Name" />
<DataGridHyperlinkColumn Header="Link" Binding="{Binding}" >
<DataGridHyperlinkColumn.ElementStyle>
<Style>
<EventSetter Event="Hyperlink.Click" Handler="Hyperlink_Click" />
</Style>
</DataGridHyperlinkColumn.ElementStyle>
</DataGridHyperlinkColumn>
</DataGrid.Columns>
</DataGrid>
</StackPanel>
</TabItem>
<TabItem Header="Tasks">
<Grid x:Name="MyTasks" />
</TabItem>
</TabControl>
</telerik:RadPane>
</telerik:RadPaneGroup>
</telerik:RadSplitContainer>
</telerik:RadDocking>
</Grid>
</Window>
Code behind:
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Runtime.CompilerServices;
using
System.Windows;
using
System.Windows.Controls;
using
System.Windows.Documents;
using
System.Windows.Input;
namespace
DockHidingIssue
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public
partial
class
MainWindow : Window, INotifyPropertyChanged
{
private
IEnumerable<
string
> _data;
public
MainWindow()
{
InitializeComponent();
DataContext =
this
;
Data =
new
List<
string
>
{
};
}
public
IEnumerable<
string
> Data
{
get
{
return
_data; }
set
{
_data = value;
OnPropertyChanged();
}
}
public
event
PropertyChangedEventHandler PropertyChanged;
private
void
FrameworkElement_OnContextMenuOpening(
object
sender, ContextMenuEventArgs e)
{
(sender
as
FrameworkElement).Focus();
}
private
void
One_OnClick(
object
sender, RoutedEventArgs e)
{
Data =
new
List<
string
>
{
};
}
private
void
Two_OnClick(
object
sender, RoutedEventArgs e)
{
Data =
new
List<
string
>
{
};
}
private
void
Three_OnClick(
object
sender, RoutedEventArgs e)
{
Data =
new
List<
string
>
{
};
}
protected
virtual
void
OnPropertyChanged([CallerMemberName]
string
propertyName =
null
)
{
PropertyChanged?.Invoke(
this
,
new
PropertyChangedEventArgs(propertyName));
}
private
void
MnuSelected_OnSubmenuOpened(
object
sender, RoutedEventArgs e)
{
mnuSelected.Items.Clear();
mnuSelected.Items.Add(Resources[
"one"
]
as
MenuItem);
mnuSelected.Items.Add(Resources[
"two"
]
as
MenuItem);
mnuSelected.Items.Add(Resources[
"three"
]
as
MenuItem);
}
private
void
SearchRadPane_OnMouseEnter(
object
sender, MouseEventArgs e)
{
SearchRadPane.Focus();
}
private
void
Hyperlink_Click(
object
sender, RoutedEventArgs e)
{
var link = e.OriginalSource
as
Hyperlink;
if
(link !=
null
)
Browser.Navigate(link.NavigateUri.OriginalString);
}
}
}
Thanks,
Alex
<telerik:RadGridView Grid.Row="1"
AutoGenerateColumns="False"
IsFilteringAllowed="False" CanUserResizeColumns="False" ShowGroupPanel="False"
RowIndicatorVisibility="Collapsed"
SelectionMode="Single" SelectionUnit="FullRow"
telerik:StyleManager.Theme="Windows8Touch"
ItemsSource="{Binding Rückstellproben_RadGridView}"
SelectedItem="{Binding Rückstellproben_RadGridView_SelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<telerik:GridViewDataColumn
Header="Freigabe"
HeaderTextAlignment="Center"
MinWidth="120">
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<telerik:RadButton Content="Bestätigen"
IsEnabled="False"
Margin="3, 0, 3, 0"/>
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
<telerik:GridViewDataColumn.CellEditTemplate>
<DataTemplate>
<telerik:RadButton Content="Bestätigen"
x:Name="rb_Stellplatzfreigabe_der_dritten_Rückstellprobe"
Margin="3, 0, 3, 0">
<telerik:RadButton.Style>
<Style TargetType="telerik:RadButton">
<Style.Triggers>
<DataTrigger Binding="{Binding Rückstellproben_RadGridView_Kryobox_Position_dritte_Probe_ID}" Value="{x:Null}">
<Setter Property="IsEnabled" Value="True"/>
</DataTrigger>
</Style.Triggers>
</Style>
</telerik:RadButton.Style/>
</telerik:RadButton>
</DataTemplate>
</telerik:GridViewDataColumn.CellEditTemplate>
</telerik:GridViewDataColumn/>
</telerik:RadGridView>
(Left Picture - CellTemplate / Right Picture - CellEditTemplate with DataTrigger / Bottom - if i try to change the Height)
Greets