I am using the savelayout and loadlayout functions to save and load dock layout. This is working as expected.
The issue I'm having is where I should put the loadlayout code in the page lifecycle.
If I add the load function to the constructor as expected the layout is ignored and the default is used. If I add the load function to the contentrendered code the user see's the dock jerk from one layout to another.
Ideally I don't want the user to see the move from default to loaded layouts.
Can you explain how I achieve this please?
Many thanks
R
Hi guys,
I'm trying to decrease the GanttView row height, I'm using the Material Theme and I'm able to do it.
I already set this style on my xaml without luck
<sys:Double x:Key="RowHeight">8</sys:Double>
<Style TargetType="telerik:SimpleCellContainer" BasedOn="{StaticResource SimpleCellContainerStyle}">
<Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
</Style>
<Style TargetType="telerik:CellContainer" BasedOn="{StaticResource CellContainerStyle}">
<Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
</Style>
<Style TargetType="telerik:CellEditingContainer" BasedOn="{StaticResource CellEditingContainerStyle }">
<Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
</Style>
<Style TargetType="telerik:SimpleTreeCellContainer" BasedOn="{StaticResource SimpleTreeCellContainerStyle }">
<Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
</Style>
<Style TargetType="telerik:DragResizeSlotHighlightContainer" BasedOn="{StaticResource DragResizeSlotHighlightContainerStyle}">
<Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
</Style>
<Style TargetType="telerik:CellHighlightContainer" BasedOn="{StaticResource CellHighlightContainerStyle}">
<Setter Property="MinHeight" Value="{StaticResource RowHeight}" />
</Style>
Someone can help me?
Best regards
Enrico
I'm struggling to style the MapCommandBar because I can't find the properties referred to in the Styling the MapCommandBar article e.g. MapButtonBackground. Where can I set that? It doesn't exist in the generated default MapCommandBar or RadMap style templates
Thanks,
Simon
<
Style
TargetType
=
"{x:Type tk:RadRadioButton}"
BasedOn
=
"{StaticResource {x:Type tk:RadRadioButton}}"
>
<
Setter
Property
=
"CornerRadius"
Value
=
"3"
/>
</
Style
>
<
Application.Resources
>
<
ResourceDictionary
>
<
ResourceDictionary.MergedDictionaries
>
<
tk:Windows8ResourceDictionary
/>
<
tk:Windows8TouchResourceDictionary
/>
Hi there,
Somehow I need to get old parent and new parent of a task after reordering it, but I can't find any event for that purpose. Can anyone help me with that please?
Thanks,
Developer1992
Hello,
I have been examining the Telerik source code and notice several anti-patterns related to automation peers. For several controls, the automation peers have function overrides that return unhelpful strings. One example is the RadGridViewAutomationPeer GetHelpTextCore method returns "RadGridView". Because of this, it's impossible to set help text for individual grids in XAML which is the default behavior of the GridViewDataControlAutomationPeer. Even though the RadGridViewAutomationPeer can be inherited from and its GetHelpTextCore method modified, not all Telerik automation peers are overridable. GridViewCell and GridViewRow for example require internally scoped properties and can't be overridden.
Right now I am able to bypass these issues by making the changes to the source code and recompiling it, but this is not a long term sustainable solution. Does Telerik have any sort of road map available for addressing automation peer issues?
Hi,
I was trying to add a qr into a RadFixedDocument like this
RadBarcodeQR qr =
new
RadBarcodeQR();
qr.Mode = QRClassLibrary.Modes.CodeMode.Byte;
qr.Text = documentHistory.SerialId.ToString();
qr.Width = 88;
qr.Height = 88;
using
(MemoryStream stream =
new
MemoryStream())
{
Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(qr, stream,
new
PngBitmapEncoder());
//RadFixedDocument
document.InsertImage(stream, area);
}
I have the following error on this line: Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(qr, stream, new PngBitmapEncoder());
Parameter value must be greater then 0. ParameterName: pixelWidth
in System.Windows.Media.Imaging.RenderTargetBitmap..ctor(Int32 pixelWidth, Int32 pixelHeight, Double dpiX, Double dpiY, PixelFormat pixelFormat)
in Telerik.Windows.Media.Imaging.ExportHelper.GetBitmapSource(FrameworkElement element, Double dpiX, Double dpiY)
in Telerik.Windows.Media.Imaging.ExportHelper.GetElementImage(FrameworkElement element)
in Telerik.Windows.Media.Imaging.ImageExporter.Export(FrameworkElement element, Stream stream, BitmapEncoder encoder)
in Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(FrameworkElement element, Stream stream, BitmapEncoder encoder)
in MileClient.DocumentUserControl.ExportAndViewDocumentWithImageStamp(DocumentHistoryEntity documentHistory) in D:\MyClient\Source\Gui\Wpf\UserControls\DocumentUserControl.xaml.cs:riga 714
in MileClient.DocumentUserControl.OpenDocumentHistoryButton_Click(Object sender, RoutedEventArgs e) in D:\MyClient\Source\Gui\Wpf\UserControls\DocumentUserControl.xaml.cs:riga 614
in System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
in System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
in System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
in System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
in System.Windows.Controls.Primitives.ButtonBase.OnClick()
in System.Windows.Controls.Button.OnClick()
in System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
in System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
in System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
in System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
in System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
in System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
in System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
in System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
in System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
in System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
in System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
in System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
in System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
in System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
in System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
in System.Windows.Input.InputManager.ProcessStagingArea()
in System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
in System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
in System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
in System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
in System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
in MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
in MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
in System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
in System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Hello
I use the GridView and I want to know how to select no cell when SelectionUnit = "FullRow" is set. Currently the row is selected, but also the clicked cell (is shown as selected). I'm using the Material-Theme and Version 19.1.220.
Thanks.
Hi, I created a Validation Class and I using with a RadComboBox that is populated by MySQL but the validation doesn't work. When I populate by RadComboBoxItem it's work.
Validation.cs:
namespace Drex.Classes
{
public class Validations : ViewModelBase, IDataErrorInfo
{
private string _NumeroProcesso;
private DateTime? _Data;
private Double? _AreaTerreno;
private string _Parametro;
private string _Interessado;
private string _Endereco;
private string _AutorProjeto;
private string _ARTAutorProjeto;
private string _ResponsavelExecucao;
private string _ARTResponsavelExecucao;
private string _ResponsavelAnalise;
public string NumeroProcesso
{
get { return _NumeroProcesso; }
set { _NumeroProcesso = value; this.OnPropertyChanged("NumeroProcesso"); }
}
public DateTime? Data
{
get { return _Data; }
set { _Data = value; this.OnPropertyChanged("Data"); }
}
public Double? AreaTerreno
{
get { return _AreaTerreno; }
set { _AreaTerreno = value; this.OnPropertyChanged("AreaTerreno"); }
}
public string Parametro
{
get { return _Parametro; }
set { _Parametro = value; this.OnPropertyChanged("Parametro"); }
}
public string Interessado
{
get { return _Interessado; }
set { _Interessado = value; this.OnPropertyChanged("Interessado"); }
}
public string Endereco
{
get { return _Endereco; }
set { _Endereco = value; this.OnPropertyChanged("Endereco"); }
}
public string AutorProjeto
{
get { return _AutorProjeto; }
set { _AutorProjeto = value; this.OnPropertyChanged("AutorProjeto"); }
}
public string ARTAutorProjeto
{
get { return _ARTAutorProjeto; }
set { _ARTAutorProjeto = value; this.OnPropertyChanged("ARTAutorProjeto"); }
}
public string ResponsavelExecucao
{
get { return _ResponsavelExecucao; }
set { _ResponsavelExecucao = value; this.OnPropertyChanged("ResponsavelExecucao"); }
}
public string ARTResponsavelExecucao
{
get { return _ARTResponsavelExecucao; }
set { _ARTResponsavelExecucao = value; this.OnPropertyChanged("ARTResponsavelExecucao"); }
}
public string ResponsavelAnalise
{
get { return _ResponsavelAnalise; }
set { _ResponsavelAnalise = value; this.OnPropertyChanged("ResponsavelAnalise"); }
}
public Validations(Processo_Type items, bool _selected)
{
if (_selected)
{
NumeroProcesso = items.Numero;
Data = items.Data;
AreaTerreno = 10.2;
Parametro = "";
Interessado = items.Interessado;
Endereco = items.Endereco;
AutorProjeto = items.AutorProjeto;
ARTAutorProjeto = items.ARTAutorProjeto;
ResponsavelExecucao = items.ResponsavelExecucao;
ARTResponsavelExecucao = items.ARTResponsavelExecucao;
ResponsavelAnalise = items.ResponsavelAnalise;
}
else
{
NumeroProcesso = null;
Data = null;
AreaTerreno = 0.0;
Parametro = null;
Interessado = null;
Endereco = null;
AutorProjeto = null;
ARTAutorProjeto = null;
ResponsavelExecucao = null;
ARTResponsavelExecucao = null;
ResponsavelAnalise = null;
}
}
public string this[string columnName]
{
get
{
Debug.WriteLine(columnName);
if ("NumeroProcesso" == columnName)
{
if (String.IsNullOrEmpty(NumeroProcesso))
{
return "Favor informar o número do processo";
}
}
if ("Data" == columnName)
{
if (!_Data.HasValue)
{
return "Favor informar a data do processo";
}
}
if ("AreaTerreno" == columnName)
{
if ((AreaTerreno == 0.0) || (!AreaTerreno.HasValue))
{
return "Favor informar o total da área do terreno";
}
}
if ("Parametro" == columnName)
{
if (String.IsNullOrEmpty(Parametro))
{
return "Favor informar um parâmetro";
}
}
if ("Interessado" == columnName)
{
if (String.IsNullOrEmpty(Interessado))
{
return "Favor informar o nome do interessado";
}
}
if ("Endereco" == columnName)
{
if (String.IsNullOrEmpty(Endereco))
{
return "Favor informar o endereço do projeto";
}
}
if ("AutorProjeto" == columnName)
{
if (String.IsNullOrEmpty(AutorProjeto))
{
return "Favor informar o nome do autor do projeto";
}
}
if ("ARTAutorProjeto" == columnName)
{
if (String.IsNullOrEmpty(ARTAutorProjeto))
{
return "Favor informar a ART do autor do projeto";
}
}
if ("ResponsavelAnalise" == columnName)
{
if (String.IsNullOrEmpty(ResponsavelAnalise))
{
return "Favor informar o nome do responsável pela análise";
}
}
return "";
}
}
public string Error
{
get { throw new NotImplementedException(); }
}
}
}
.xaml:
<telerik:RadComboBox Text="{Binding Parametro, Mode=TwoWay, ValidatesOnDataErrors=True, NotifyOnValidationError=True, ValidatesOnExceptions=True}"
x:Name="Parametro"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Left"
EmptyText="[selecione um parâmetro]"
IsEditable="True"
IsReadOnly="True"
DataContext="{StaticResource Parametro_Call}"
ItemsSource="{Binding Parametros}"
DisplayMemberPath="Parametro"
SelectedValuePath="IDParametro"/>