Telerik Forums
UI for WPF Forum
4 answers
77 views
Hi there,

I'm trying to style the property grid chrome, but whenever I drag a  <telerik:PropertyGridField/> to the design view, I get a red box error (see attached).

Could someone give me the XAML of the default style & template so I can edit without adding a PropertyGridField control?

Many thanks

Felix
felix
Top achievements
Rank 1
 answered on 10 May 2012
4 answers
242 views
Hello,

I am using a telerik:RadGridView with is bound to a collection.

In a column of have the following CellStyleSelector 

<telerik:GridViewDataColumn.CellStyleSelector>
                        <telerik:ConditionalStyleSelector>
                            <telerik:StyleRule Condition="Name= 'N/A'">
                                <telerik:StyleRule.Style>
                                    <Style TargetType="telerik:GridViewCell">
                                        <Setter Property="IsEnabled" Value="False"  />
                                    </Style>
                                </telerik:StyleRule.Style>
                            </telerik:StyleRule>
                        </telerik:ConditionalStyleSelector>
                    </telerik:GridViewDataColumn.CellStyleSelector>

This works perfectly for me. However I want this CellStyleSelector on every column expect the Name column.

Is it possible to add a CellStyleSelector as a XAML resource so I can reuse it.

e.g

<telerik:GridViewDataColumn CellStyleSelector="{StaticResource MySelector}" Name="colage" Width="50" Header="Age" DataMemberBinding="{Binding Age, Mode=TwoWay}" />

 I am aware I could create a style selector class but i would prefer to keep it all in the XAML



Stu
Top achievements
Rank 1
 answered on 10 May 2012
1 answer
95 views
Has anyone tried to put line numbers down the side of a document? Just like what you get with a code compiler.

Thanks,

Rob
Robert
Top achievements
Rank 1
 answered on 10 May 2012
2 answers
202 views
Hi,

Is it possible to set the AutoComplete text programmatically?

I have the following ListBox:
<telerik:RadListBox MinWidth="100" MaxHeight="250" x:Name="radListBox"
                    Grid.ColumnSpan="2" Visibility="Collapsed"
                    HorizontalAlignment="Left" VerticalAlignment="Top"
                    CanAutocompleteSelectItems="True" IsTextSearchEnabled="True" TextSearchMode="Contains" TextPath="Name"
                    ItemTemplate="{StaticResource AutoCompleteListBoxTemplate}"
                    ItemsSource="{Binding autoCompleteListItems}"
                    MouseDoubleClick="radListBox_MouseDoubleClick" MouseUp="radListBox_MouseUp">
    <telerik:RadListBox.Effect>
        <DropShadowEffect ShadowDepth="10" Color="Gray" Opacity=".4" Direction="320" RenderingBias="Performance" />
    </telerik:RadListBox.Effect>
</telerik:RadListBox>

The ListBox uses this template:
<DataTemplate x:Key="AutoCompleteListBoxTemplate">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Image Style="{StaticResource AutoCompleteListBoxIcon}" Width="10" Height="10" Margin="0,0,10,0" />
<TextBlock Text="{Binding Name}" Grid.Column="1" HorizontalAlignment="Stretch" />
<TextBlock Text="" Grid.Column="2" HorizontalAlignment="Right" Margin="5,0,5,0" />
</Grid>
</DataTemplate>


I set the ItemsSource in code behind:
private void radRichTextBox_Loaded(object sender, RoutedEventArgs e)
{
    //Set Autocomplete ListBox itemssource
    radListBox.ItemsSource = autoCompleteListItems;
}


The documentation does state the following:
RadListBox has full autocomplete support - while the control is focused, you can type certain keys and the listbox will select the relative match for the currently typed text. 

I'm building a RichTextBox Intellisense application, thus the ListBox is the Intellisense. The application is setup to always send focus back to the RichTextBox so that the user can continue typing.

Is it possible to set the ListBox AutoComplete text in code behind? i.e. when the user types text in the RadRichText box, the text they type is used to set AutoComplete the ListBox.

I've tried setting the TypedText property:
listBox.TypedText = "He";

However this doesn't seem to do anything.

Thank you very much,

Rob



Robert
Top achievements
Rank 1
 answered on 10 May 2012
1 answer
140 views
Hi,
  I tried to put two lines in header. The first page´s header its ok when i print it, but the next pages the header changes like this:

first page´s header: 

---------------------------------------------------------------------------------------
Title
                                                                                                      date
---------------------------------------------------------------------------------------

next page´s header:
---------------------------------------------------------------------------------------
date
                                                                                                      Title
---------------------------------------------------------------------------------------


This is the code:
RadDocument headerDoc = new RadDocument();
RadDocument footerDoc = new RadDocument();
 
Section hSection = new Section();
hSection.PageOrientation = PageOrientation.Landscape;
 
headerDoc.DefaultPageLayoutSettings = new PageLayoutSettings(PaperTypes.A4);
headerDoc.SectionDefaultPageOrientation = PageOrientation.Landscape;
headerDoc.Sections.Add(hSection);
headerDoc.SectionDefaultPageMargin = new Telerik.Windows.Documents.Layout.Padding(5, 5, 5, 5);
 
Paragraph hparagraph = new Paragraph();
hSection.Blocks.Add(hparagraph);
 
Span hspan = new Span("Title");
hspan.FontSize = 20;
if (!string.IsNullOrEmpty("Title"))
    hparagraph.Inlines.Add(hspan);
 
Paragraph h2paragraph = new Paragraph();
h2paragraph.TextAlignment = RadTextAlignment.Right;
hSection.Blocks.Add(h2paragraph);
var fecha = DateTime.Now;
Span h2span = new Span(fecha.ToString());
h2span.FontSize = 10;
h2paragraph.Inlines.Add(h2span);
 
Section fSection = new Section();
fSection.PageOrientation = PageOrientation.Landscape;
 
footerDoc.DefaultPageLayoutSettings = new PageLayoutSettings(PaperTypes.A4);
footerDoc.SectionDefaultPageOrientation = PageOrientation.Landscape;
footerDoc.Sections.Add(fSection);
footerDoc.SectionDefaultPageMargin = new Telerik.Windows.Documents.Layout.Padding(5, 5, 5, 5);
 
Paragraph fparagraph = new Paragraph();
fSection.Blocks.Add(fparagraph);
 
Span fspan = new Span("Footer");
fspan.FontSize = 30;
if(!string.IsNullOrEmpty("Footer"))
    fparagraph.Inlines.Add(fspan);
 
Header header = new Header();
Footer footer = new Footer();
header.Body = headerDoc;
footer.Body = footerDoc;
 
Section section = new Section();
section.PageOrientation = PageOrientation.Landscape;
section.Headers.Default = header;
section.Footers.Default = footer;
 
return section;


Thank you, for your service.
Alex
Telerik team
 answered on 10 May 2012
1 answer
105 views
Hi Telerik-Team,

i'd like to customize the X-Axis, but i can't figure out how to solve the problem.

I'd like to have 12 marks on the X-Axis that represent the 12 months of the year,
but only the quarter marks should display text like Q1/2012, Q2/2012...

Do you have any idea?

kind regards
Hubert
Evgenia
Telerik team
 answered on 10 May 2012
1 answer
1.5K+ views
Hi there,

I am trying to use the docking as overlay to my existing WPF application.

I did set the background of the docking to transparent, but I can not click on the items behind it.

If I set ishittestvisible to false then I can click on the items behind the but I can not click on any item in the docking panes anymore.

Is there any trick to archieve this.

My goal is to have a streched docking over my entire application in order to bring in tools from all sides while being able to interact with the underlying grid of controls.

Any hint would be appreciated.
Miroslav Nedyalkov
Telerik team
 answered on 10 May 2012
1 answer
149 views
Hello,

We have created a small WPF-application which is used to display PDF-files.  Although the application works fine on some machines, on others we get an unhandled COMException when we scroll through the document's pages. The exception is not always thrown on the same page and the size of the document or the speed of scrolling does not seem to have an influence.

The documents we tried to display are not corrupt and can be viewed perfectly with other PDF-viewers.  The PDF documents are also quite small (+/- 10 pages).

Below you find the call stack of the exception.

Application: PdfViewer.exe

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: System.Runtime.InteropServices.COMException

Stack:

   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32, IntPtr)

   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32, IntPtr)

   at MS.Internal.Text.TextInterface.Native.Util.ConvertHresultToException(Int32)

   at MS.Internal.Text.TextInterface.Factory.CreateFontFace(System.Uri, UInt32, MS.Internal.Text.TextInterface.FontSimulations)

   at System.Windows.Media.GlyphTypeface.Initialize(System.Uri, System.Windows.Media.StyleSimulations)

   at System.Windows.Media.GlyphTypeface..ctor(System.Uri, System.Windows.Media.StyleSimulations)

   at System.Windows.Documents.Glyphs.ParseGlyphRunProperties()

   at System.Windows.Documents.Glyphs.ComputeMeasurementGlyphRunAndOrigin()

   at System.Windows.Documents.Glyphs.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Canvas.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Canvas.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Canvas.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.Controls.Canvas.MeasureOverride(System.Windows.Size)

   at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)

   at System.Windows.UIElement.Measure(System.Windows.Size)

   at System.Windows.ContextLayoutManager.UpdateLayout()

   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(System.Object)

   at System.Windows.Media.MediaContext+InvokeOnRenderCallback.DoWork()

   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()

   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(System.Object)

   at System.Windows.Media.MediaContext.RenderMessageHandler(System.Object)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)

   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

   at System.Windows.Threading.DispatcherOperation.InvokeImpl()

   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)

   at System.Threading.ExecutionContext.runTryCode(System.Object)

   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)

   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

   at System.Windows.Threading.DispatcherOperation.Invoke()

   at System.Windows.Threading.Dispatcher.ProcessQueue()

   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)

   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)

   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

   at System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)

   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)

   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)

   at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)

   at System.Windows.Threading.Dispatcher.Run()

   at System.Windows.Application.RunDispatcher(System.Object)

   at System.Windows.Application.RunInternal(System.Windows.Window)

   at System.Windows.Application.Run(System.Windows.Window)

   at PdfViewer.App.Main()


We've also tried the Telerik demo application and this also shows an exception that not enough storage is available.  There's definetely enough memory and disk space available for the application. 

Could you please help us solve this issue.

Kind regards.
Vasil
Telerik team
 answered on 10 May 2012
1 answer
112 views
Hi,
   I insert a table into RadDocument, then i want to set static width to that table and i can´t.

This is my code:
var columns = (from c in grid.Columns.OfType<GridViewBoundColumnBase>()
                           where c.IsVisible
                           orderby c.DisplayIndex
                           select c).ToList();
var widthTable = 0f;
foreach (var col in columns )
{
    widthTable += (float)col.Width.DisplayValue ;
}
 
Table table = new Table();
table.CellPadding = new Padding(5);
if (widthTable > 0)
    table.PreferredWidth = new TableWidthUnit(widthTable);


Thanks for your service.
Mihail
Telerik team
 answered on 10 May 2012
0 answers
91 views
Hi ,

Please anyone reply for the below mail chain, i have been waiting for more than two days for getting the fix for the below said things.

I already sent many mails regarding alternate row background color but not even a single mail reply from ur end ...

reply me ASAP.



Hi Maya,

I have applied  Alternating colour in telerik grid  but after given the alternate item colour the mouse over is not working perfectly (For an example 1st colour is blue the second colour white when hover over the Blue it showing my hover over colour Dark blue but when i hover over the white it is showing yellow colour) how can i resolved this issue please help me out because already i sent mail but no response for that.



Consider this as a high priority one and please help me to solve the issues
Regards,
Arafath.
Mohamed
Top achievements
Rank 1
 asked on 10 May 2012
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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?