Telerik Forums
UI for WPF Forum
1 answer
156 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
119 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.6K+ 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
167 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
144 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
105 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
4 answers
166 views
Do you have an sample for applying a transition when loading  a diagram.  For example, if I have an existing diagram and want to fade or zoom to a new diagram when I issue the Load() command?
The Cowboy
Top achievements
Rank 1
 answered on 09 May 2012
3 answers
209 views
Hi,

I'm using a RadTileView and it contains some Textblocks. I have a Combobox above the RadTileView that contains int values for font sizes so that when a combobox selection is made the font size of the Textblocks are updated. When I adjust the window size of the RadTileView (with the mouse) it'll update the views so the new font size fits right. I'd like to update the views whenever the combobox is refreshed so I don't have to resize the window manually to achieve this. Preferably in xaml as the RadTileView is within a DataTemplate and difficult to get to.

If it's any help, the binding the Textblocks use is {Binding Source={StaticResource TVFieldSetsVM}, Path=CommonFontSize}.

Thanks
Zarko
Telerik team
 answered on 09 May 2012
2 answers
76 views
I want to move the "add new Record button" to the bottom becase
a) it's more intutive that way and
b) it sometimes dosn't update and then the new record still appears to be the first record instead of the last which is what it really is.

There is a soltion that changes the control template using something called "<VisualStateManager.VisualStateGroups>" which I can't use because I'm still using visual studio 3.5 not 4.0.  I am by no means an expert with wpf yet so I don't even know how to do a control template.  Can someone point me in the right direction.
Alex
Top achievements
Rank 1
 answered on 09 May 2012
2 answers
105 views
I can't figure out how to get rid of the vertical line on the X Axis at zero on my scatter chart.  I have some scatter charts that it appears in and others that it does not, but I am unable to find an axis property that control this.  Does anyone know how to control this? 

Thanks!
Nicholas
Top achievements
Rank 2
 answered on 09 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
DataPager
PersistenceFramework
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?