Telerik Forums
UI for WPF Forum
2 answers
140 views

hello,

For some reason i have to create custom liststyle based on existing one. You can find the detail in the attached picture. So is it possible to create these things? I've spent almost a a week and still stuck in this mess.

thanks in advance, and sorry for my bad english.

Deri.

deri
Top achievements
Rank 1
 answered on 27 Sep 2016
3 answers
156 views
Hello. 

I am having a strange problema and i already tried everything i remember.

When I am in Debug everything works Fine.

But when i am in Release mode i am getting always this error, whenever i try to Open a Window with RadRichTextBox.

I Have Absolute no code associated. Only a RadRichTextBox in a Grid.

Please help!!

Error code:

System.NullReferenceException: A referência de objecto não foi definida como uma instância de um objecto.
   em Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.UpdateCaretStyle()
   em Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.MeasureOverride(Size availableSize)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   em System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em System.Windows.Controls.Control.MeasureOverride(Size constraint)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   em System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   em System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   em System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em System.Windows.Controls.Border.MeasureOverride(Size constraint)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em System.Windows.Controls.Control.MeasureOverride(Size constraint)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   em System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   em System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   em System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   em System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em System.Windows.Controls.Border.MeasureOverride(Size constraint)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em System.Windows.Controls.Control.MeasureOverride(Size constraint)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   em System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   em System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   em System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   em System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em System.Windows.Controls.Border.MeasureOverride(Size constraint)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em System.Windows.Window.MeasureOverrideHelper(Size constraint)
   em System.Windows.Window.MeasureOverride(Size availableSize)
   em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   em System.Windows.UIElement.Measure(Size availableSize)
   em System.Windows.ContextLayoutManager.UpdateLayout()
   em System.Windows.UIElement.UpdateLayout()
   em System.Windows.Interop.HwndSource.SetLayoutSize()
   em System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
   em System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
   em System.Windows.Forms.Integration.ElementHost.<OnHandleCreated>b__54_0()
   em System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout)
   em System.Windows.Threading.Dispatcher.Invoke(Action callback)
   em System.Windows.Forms.Integration.ElementHost.OnHandleCreated(EventArgs e)
   em System.Windows.Forms.Control.WmCreate(Message& m)
   em System.Windows.Forms.Control.WndProc(Message& m)
   em System.Windows.Forms.Integration.ElementHost.WndProc(Message& m)
   em System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   em System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   em System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Lance | Senior Manager Technical Support
Telerik team
 answered on 26 Sep 2016
4 answers
475 views

We have custom columns in our gridviews as one below. When exporting to Excel, the key values are exported instead of displays values.

<lookups:GridViewProjectLookupColumn Header="Project Number"
                                                       DataMemberBinding="{Binding ProjectRecId}"
                                                       DisplayMemberBinding="{Binding Project_ProjectRecId}"
                                                       DisplayMemberPath="ProjId"
                                                       SortMemberPath="Project_ProjectRecId.ProjId"
                                                       FilterMemberPath="Project_ProjectRecId.ProjId"
                                                       ProjectTypeVisible="False"
                                                       CustomerAccountVisible="False"
                                                       ProjectStageVisible="False"
                                                       IsReadOnlyBinding="{Binding IsManualReadOnly}" />

Is there a way to export the value of DisplayMemeberPath (ProjId) instead of the DataMemeberBinding( ProjectRecId)?

 

Thanks,

Rūta

 

 

Ruta
Top achievements
Rank 1
 answered on 26 Sep 2016
5 answers
349 views

I have a RadGridView and I've used the article located at: http://docs.telerik.com/devtools/wpf/controls/radgridview/style-selectors/rowstyleselector for styling the row Foreground color. Everything works great except the Alternate Rows have the same color as the "regular" (non-alternate) rows.

I use the "BasedOn" attribute of the style to use the loaded theme (expression_dark) and I thought I would create a second style just for the alternate rows. 

Here is the style code:

<Grid.Resources>
    <my:WorkListStyle x:Key="WorkListStyle">
        <my:WorkListStyle.ViewItem>
            <Style TargetType="telerik:GridViewRow" BasedOn="{StaticResource GridViewRowStyle}">
                <Setter Property="Foreground" Value="Yellow" />
            </Style>
        </my:WorkListStyle.ViewItem>
    </my:WorkListStyle>
    <my:WorkListAltStyle x:Key="WorkListAltStyle">
        <my:WorkListAltStyle.ViewItem>
            <Style TargetType="telerik:GridViewRow" BasedOn="{StaticResource GridViewAlternateRowStyle}">
                <Setter Property="Foreground" Value="Yellow" />
            </Style>
        </my:WorkListAltStyle.ViewItem>
    </my:WorkListAltStyle>
</Grid.Resources>

Then, in the RadGridView, I set these two options:

RowStyleSelector="{StaticResource WorkListStyle}"
AlternateRowStyleSelector="{StaticResource WorkListAltStyle}"

However, I get a run-time error when the xaml is parse on the "GridViewAlternateRowStyle" in the BasedOn attribute. Is there a different StaticResource I should be using? Thank you.

 

Scott
Top achievements
Rank 1
 answered on 26 Sep 2016
1 answer
207 views

Dear Devexpress,

We are using your Gridview for WPF version 2015.1.225.40.

We have a problem :

for all columns we have a CellTemplate and a CellEditTemplate. The CellTemplate  displays a value(sum) and is always read only.

The CellEditTemplate contains 2 textboxes were 2 separate values can be entered.
When those 2 Textboxes in the CellEditTemplate are read-only, there is still a way to enter a value., Why ?

How is it possible ? By selecting a column by mouse. Just one click on it.( It may not go in CellEditTemplate ). Then press a key (fe 2). Result => the readonly textbox contains now a 2 !

This may not happen.

Is there a solution to fix this problem ?

I have put the exemple code in a attached file. When the CanEdit1 property is set to false the problem occurs.

regards,
Gert

 

 

 

Stefan
Telerik team
 answered on 26 Sep 2016
5 answers
156 views

Hi,

  I want similar editor as RadBrowseEditor in WPF where I can default path to open while opening the file dialog.Is there any similar editor in WPF controls or Is there any alternative??

Regards,

Nagasree.

Dilyan Traykov
Telerik team
 answered on 26 Sep 2016
1 answer
460 views

I'm trying to override or remove the ability to click directly on the content of a DesktopAlert. My problem is that when you set the alert's content to a plain string, it acts as a link-button and upon clicking the text, it will close the window. This is a problem since there are certain DesktopAlerts that I don't want to be closed at all. I can set it as Enabled = False but then the dropdown menu and other parts of the alert quit functioning. This is all created from code behind so it is a little harder for me to set any properties or templates for it in XAML. I thought perhaps I should post in this forum and see if there is a way to not only remove the ability to click the content, but also to remove/override events in code-behind in general for WPF controls created server-side.

Dim mainAlert = New RadDesktopAlert() With {
    .Header = "Messages",
    .Content = "You have " & unreadCount & " new messages",
    .Height = 75,
    .Width = 300,
    .IconTemplate = TryCast(Application.Current.FindResource("radIconTemplate"), DataTemplate),
    .IconColumnWidth = 30,
    .IconMargin = New Thickness(5, 10, 15, 0),
    .CanAutoClose = False,
    .ShowCloseButton = False,
    .Tag = "main",
    .ShowMenuButton = True,
    .MenuItemsSource = GetDesktopAlertMenuItems
}
manager.ShowAlert(mainAlert)

Nasko
Telerik team
 answered on 26 Sep 2016
3 answers
222 views

Hi to all,

I would using ComboBox in specific behavior:

I populate ItemSource with List<MyModel>, OK.

I have to use IsEditable, IsFilteringEnabled, TextSearchMode that allow me to search through items.

When I want to select an item, I click on it. (Selection item not must be automatic)

After that I'll clear selecteditem.

Can I do it?

I tryed with MouseLeftButtonDown  event but it doesn't fire.

Polya
Telerik team
 answered on 26 Sep 2016
5 answers
1.0K+ views
I want the QRCode size to match the Width & Height I specify on the control, but this doesn't work.
The size of the QRCode seems to be limited by Width & Height, but only changes when I set the Version differently.

I have tried to set the content alignment to Stretch also to no effect.

Can you please tell me how to do this?

Thanks,
 Alan
Martin Ivanov
Telerik team
 answered on 26 Sep 2016
6 answers
252 views

I have a RadCartesianChart with a DateTimeContinuousAxis. 

Is it possible to specify a zoom level based on a timespan? 

So that I only see 10 minutes of the chart - even when adding more data. And off course being able to pan through the rest of the chart. 

/Flemming Rosenbrandt

Petar Marchev
Telerik team
 answered on 26 Sep 2016
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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?