Telerik Forums
UI for WPF Forum
1 answer
142 views

I use auto generate property and find  it to an object with a string property....

(in edit mode) if i type a super long text into the textbox, the width of the textbox would keep increasing so the whole text is always visible

How can i change that behavior to have width of the textbox fixed?

 

Please see attached

Dilyan Traykov
Telerik team
 answered on 30 Dec 2015
5 answers
284 views
Hi,

I have  2014.1.331.40 version

I am using mail merge functionality of telerik RichTextBox. It working good but when I export mail merge document to pdf, it generates more than 1 mb pdf file.
I am not adding any image in the pdf file.

After PdfExportSettings below property, its generate 450 to 500 kb pdf files.

PdfFormatProvider _PdfFormatProvider = new PdfFormatProvider();
PdfExportSettings _PdfExportSettings = new PdfExportSettings();
_PdfExportSettings.ContentsCompressionMode = PdfContentsCompressionMode.Automatic;
_PdfExportSettings.ContentsDeflaterCompressionLevel = 9;
_PdfExportSettings.FloatingUIContainersExportMode = PdfInlineUIContainersExportMode.Image;
_PdfExportSettings.ImagesCompressionMode = PdfImagesCompressionMode.Automatic;
_PdfExportSettings.ImagesDeflaterCompressionLevel = 9;
_PdfExportSettings.InlineUIContainersExportMode = PdfInlineUIContainersExportMode.Image;
_PdfFormatProvider.ExportSettings = _PdfExportSettings;

Is there any option by which I can manage pdf file size upto 150 kb?

Thanks

Nisarg
Top achievements
Rank 1
 answered on 29 Dec 2015
1 answer
204 views

I have a WPF window that contains a Telerik RadPaneGroup, and in it I have a RadPanes:

<telerik:RadPaneGroup>
    <telerik:RadPane
        x:Name="ticketMapPane"
        Header="Map"
        CanUserPin="False"
        CanFloat="{Binding preferencesProperties.canFloatPanes}"
        IsHidden="{Binding Path=viewModel.stickyProperties.mapPaneVisible, RelativeSource={RelativeSource AncestorType=KtWpf:KorWindow}, Mode=TwoWay, Converter={StaticResource boolInverterConverter}}"
        telerik:RadDocking.SerializationTag="ticketMapPane"
    >
    <local:TicketMap
        x:Name="ticketMap"
        ticketMapType="{Binding RelativeSource={RelativeSource AncestorType=KtWpf:KorWindow}, Path=viewModel.preferencesProperties.ticketMapType}"
        />
    </telerik:RadPane>
</telerik:RadPaneGroup>

The ticketMapPane.IsHidden property is bound to the negation of stickyProperties.mapPaneVisible, so if mapPaneVisible is true, IsHidden is false, and the pane is displayed.

If mapPaneVisible is true on startup, ticketMapPane is visible, and ticketMap.ticketMapType is bound correctly to preferencesProperties.ticketMapType, and all is well with the world.

If I then manipulate the UI control that sets stickyProperties.mapPaneVisible to false the pane becomes invisible, if I set it to true the pane becomes visible again, and ticketMapType is bound correctly through it all.

But if stickyProperties.mapPaneVisible is false on startup, ticketMapPane is hidden, and ticketMapType doesn't seem to be bound.
I have a change handler on the ticketMapType property. It's called, when the ticketMapPane is visible on startup, and it is not, when it is not:

public partial class TicketMap : KorUserControl
{
    public TicketMapType ticketMapType
    {
        get { return (TicketMapType)GetValue(ticketMapTypeProperty); }
        set { SetValue(ticketMapTypeProperty, value); }
    }
    public static readonly DependencyProperty ticketMapTypeProperty =
        DependencyProperty.Register("ticketMapType", typeof(TicketMapType), typeof(TicketMap),
        new PropertyMetadata(new PropertyChangedCallback(ticketMapTypePropertyChanged)));
    private static void ticketMapTypePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    {
        var ticketMap = d as TicketMap;
        if (ticketMap != null && e.NewValue is TicketMapType)
        {
            var ticketMapType = (TicketMapType) e.NewValue;
            ticketMap.setTicketMapType(ticketMapType);
        }
    }
    [...]
}

So what is happening is that if the pane is hidden on startup, when I make it visible the TicketMap.ticketMapType contains the default value, and not the value that it was supposed to be bound to. If the pane is visible on startup, everything binds correctly.

So, the question - how do I get this to work?

 I can see two possibilities:

  1. I get the binding to connect even though the pane is invisible, or
  2. I get the binding to connect when the pane is made visible.

Any ideas as to how to do either?

Nasko
Telerik team
 answered on 29 Dec 2015
3 answers
97 views

I'm trying to render appointments in the scheduleview but only entire days are rendered as shown in attachment.

I'm using the Scheduleview like this 

<telerik:RadScheduleView x:Name="MainSchedule" Grid.Column="1" Margin="2" NavigationHeaderVisibility="Collapsed" AppointmentsSource="{Binding Appointments}"
                                                    ResourceTypesSource="{Binding ResourceTypes}" SelectedAppointment="{Binding SelectedAppointment, Mode=TwoWay}" MouseDoubleClick="MainSchedule_MouseDoubleClick"
                                                    CurrentDate="{Binding DateStart}" GroupHeaderContentTemplateSelector="{StaticResource GroupSelector}" AppointmentItemContentTemplate="{StaticResource AppointmentTemplate}">
                               <telerik:RadScheduleView.GroupDescriptionsSource>
                                   <scheduleView:GroupDescriptionCollection>
                                       <scheduleView:ResourceGroupDescription ResourceType="Staff" />
                                   </scheduleView:GroupDescriptionCollection>
                               </telerik:RadScheduleView.GroupDescriptionsSource>
                               <telerik:RadScheduleView.ViewDefinitions>
                                   <telerik:TimelineViewDefinition TimerulerGroupStringFormat="{}{0:dd MMM}" TimerulerMajorTickStringFormat="{}{0:HH}" TimerulerMinorTickStringFormat="{}{0:HH}"/>
                               </telerik:RadScheduleView.ViewDefinitions>
                           </telerik:RadScheduleView>

 

private void LoadHolidays()
       {
           if (_holidayResource != null)
           {
               Appointments.Clear();
               var holidays = _dataService.GetManager().TblDatStaffTime.Where(st => st.TblLstActivity.ActivityType == "Holiday" && st.RealStart >= this.CurrentView.MainSchedule.CurrentDate.FirstDayOfMonth() &&
                                   st.RealEnd < this.CurrentView.MainSchedule.CurrentDate.LastDayOfMonth()).Execute();
 
               foreach (TblDatStaffTime item in holidays)
               {
                   var appt = new HolidayAppointment(item);
 
                   if (_holidayResource.Where(c => c.Key == item.StaffID.ToString()).Count() > 0)
                   {
                       appt.Resources.Add(_holidayResource[item.StaffID.ToString()]);
                       this.Appointments.Add(appt);
                   }
               }
 
               var countApp = this.CurrentView.MainSchedule.AppointmentsSource;
           }
       }

 

public class HolidayAppointment : Appointment
   {
       private bool isReadOnly;
       public TblDatStaffTime Holiday { get; set; }
 
       public HolidayAppointment(TblDatStaffTime holiday)
       {
           this.Holiday = holiday;
       }
 
       public bool IsReadOnly
       {
           get { return this.Storage<HolidayAppointment>().isReadOnly; }
           set
           {
               var storage = this.Storage<HolidayAppointment>();
               if (storage.isReadOnly != value)
               {
                   storage.isReadOnly = value;
                   this.OnPropertyChanged(() => this.IsReadOnly);
               }
           }
       }
 
       public override string Subject
       {
           get { return Holiday.TblLstActivity.ShortName; }
       }
 
       public SolidColorBrush HolidayBrush
       {
           get { return new SolidColorBrush(StringExtensions.HexStringToColor(Holiday.TblLstActivity.Color)); }
       }
 
       public override DateTime Start
       {
           get { return this.Holiday.RealStart; }
           set
           {
               base.Start = this.Holiday.RealStart;
               this.OnPropertyChanged(() => this.Start);
           }
       }
 
       public override DateTime End
       {
           get { return this.Holiday.RealEnd; }
           set
           {
               base.End = this.Holiday.RealEnd;
               this.OnPropertyChanged(() => this.End);
           }
       }
 
       private string GetTranslation()
       {
           string result = string.Empty;
 
           switch (IdentityCSD.Language)
           {
               case IdentityCSD.Languages.EN:
                   result = Holiday.TblLstActivity.DescEN;
                   break;
               case IdentityCSD.Languages.NL:
                   result = Holiday.TblLstActivity.DescNL;
                   break;
               case IdentityCSD.Languages.FR:
                   result = Holiday.TblLstActivity.DescFR;
                   break;
               case IdentityCSD.Languages.GE:
                   result = Holiday.TblLstActivity.DescGE;
                   break;
               default:
                   result = Holiday.TblLstActivity.DescLC;
                   break;
           }
 
           return result;
       }
   }

So that appoinments that are showing are 24 hours long. And those which are not showing are less. Anyone got a solution for this ?

Nasko
Telerik team
 answered on 29 Dec 2015
9 answers
176 views
Hello,

I have the following application (OutlookBar.png), and I don't find any Properties to change the position of right OutlookBar minimize button to Left.

Best regards,
Geoffrey
Geoffrey
Top achievements
Rank 1
 answered on 28 Dec 2015
2 answers
188 views
Hi,

I try to disable scrolling in RadRibbonBackstage.

I know that changing ControlTemplate and deleting Scrollviewer works.

But this solution is not compatible with switching theme at runtime.

Please, is there any solution ?

Best regards,
Geoffrey
 
Geoffrey
Top achievements
Rank 1
 answered on 28 Dec 2015
1 answer
230 views

In Visual Studio 2012 I have problem with a RadGridView using a project binding source.  It happened after making a change in my code and recompiling.

Sometimes the problem will magically go away after clicking on a different control and then clicking on the grid again. Other times I have to completely close VS and reopen it.

Hopefully someone has suggestions on how to fix it.

Martin Ivanov
Telerik team
 answered on 25 Dec 2015
1 answer
124 views

Hello,

Where can I download the NuGet packages for WPF ? Your UG is not like in live site

 http://docs.telerik.com/devtools/wpf/installation-and-deployment/installing-telerik-ui-on-your-computer/installation-installing-from-nuget-wpf#installing-wpf-controls-package

 is this possible to get the download zip packages for all the controls that is mentioned in UG?

 

Thanks,

Abbas K

Martin Ivanov
Telerik team
 answered on 24 Dec 2015
1 answer
407 views

Hi,

I want hide  a  row completely in radgridview when specific  columns contains null(empty) values.

Maya
Telerik team
 answered on 24 Dec 2015
4 answers
412 views

Hi Team,

I am working on a WPF application which extensively uses Telerik controls.We are trying to automate few scenarios in our application. As a beginner in Coded UI I started by recording a simple flow, however while replaying the same ,faced couple of issues highlighted below

Note: We are using  Telerik version -2014.3.1202.40

Script not identifying ControlType-:TabPage,this control is located inside rbrMain.
Refer attachment –screenshot 1 & 2. Find Below the error message I receive:
Test Name:         CodedUITestMethod1
Test FullName:   CodedUITestProject_IncentBasic.CodedUITest1.CodedUITestMethod1
Test Source:        <<Project code>> failed at
Test Outcome:   Failed
Test Duration:    0:00:34.7996513
Result Message:              
Test method CodedUITestProject_IncentBasic.CodedUITest1.CodedUITestMethod1 threw exception:
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search

properties. Additional Details:
TechnologyName:  'MSAA'
ControlType:  'TabPage'
Name:  'Data'
 ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
Result StackTrace:           
at Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IScreenElement.FindAllDescendants(String bstrQueryId, Object& pvarResKeys, Int32

cResKeys, Int32 nMaxDepth)
   at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindAllScreenElement(String queryId, Int32 depth, Boolean singleQueryId,

Boolean throwException, Boolean resetSkipStep)
   at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindScreenElement(String queryId, Int32 depth, Boolean resetSkipStep)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String queryId, Int32 maxDepth, Int32& timeLeft)
 --- End of inner exception stack trace ---
    at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapControlNotFoundException(COMException ex, IPlaybackContext context)
   at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowComException(COMException innerException, IPlaybackContext context)
   at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(Exception exception, IPlaybackContext context)
   at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(Exception exception, String queryId)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String queryId, Int32 maxDepth, Int32& timeLeft)
   at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetElement(Boolean useCache, ISearchArgument searchArg)
   at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.Search(ISearchArgument searchArg)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindInternal()
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<Find>b__37()
   at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean

firePlaybackErrorEvent, Boolean logAsAction)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.Find()
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetPropertyPrivate(String propertyName)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<>c__DisplayClass3b.<GetProperty>b__3a()
   at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean

firePlaybackErrorEvent, Boolean logAsAction)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetProperty(String propertyName)
   at Microsoft.VisualStudio.TestTools.UITesting.ALUtility.GetTechElementFromUITestControl(UITestControl uiTestControl)
   at Microsoft.VisualStudio.TestTools.UITesting.ActionExecutorManager.GetActionExecutor(UITestControl uiControl)
   at Microsoft.VisualStudio.TestTools.UITesting.Mouse.ClickImplementation(UITestControl control, MouseButtons button, ModifierKeys modifierKeys,

Point relativeCoordinate)
   at Microsoft.VisualStudio.TestTools.UITesting.Mouse.<>c__DisplayClass6.<Click>b__5()
   at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean

firePlaybackErrorEvent, Boolean logAsAction)
   at Microsoft.VisualStudio.TestTools.UITesting.Mouse.Click(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point

relativeCoordinate)
   at Microsoft.VisualStudio.TestTools.UITesting.Mouse.Click(UITestControl control, Point relativeCoordinate)



When trying to click on buttons located on RBR main and not on TabPage control script is still not identifying those objects and failing on replay:
Refer Screenshot 3  in attachment .
Find below the error message.


Result Message:              
Test method Incent_Scenario2_ClickOnReportButton.CodedUITest1.CodedUITestMethod1 threw exception:
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details:

TechnologyName:  'MSAA'
ControlType:  'Button'
Name:  'Reports'

 ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
Result StackTrace:           
at Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IScreenElement.FindAllDescendants(String bstrQueryId, Object& pvarResKeys, Int32 cResKeys, Int32 nMaxDepth)
   at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindAllScreenElement(String queryId, Int32 depth, Boolean singleQueryId, Boolean throwException, Boolean resetSkipStep)
   at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindScreenElement(String queryId, Int32 depth, Boolean resetSkipStep)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String queryId, Int32 maxDepth, Int32& timeLeft)
 --- End of inner exception stack trace ---
    at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapControlNotFoundException(COMException ex, IPlaybackContext context)
   at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowComException(COMException innerException, IPlaybackContext context)
   at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(Exception exception, IPlaybackContext context)
   at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(Exception exception, String queryId)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String queryId, Int32 maxDepth, Int32& timeLeft)
   at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetElement(Boolean useCache, ISearchArgument searchArg)
   at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.Search(ISearchArgument searchArg)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindInternal()
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<Find>b__37()
   at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.Find()
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetPropertyPrivate(String propertyName)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.<>c__DisplayClass3b.<GetProperty>b__3a()
   at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
   at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.GetProperty(String propertyName)
   at Microsoft.VisualStudio.TestTools.UITesting.ALUtility.GetTechElementFromUITestControl(UITestControl uiTestControl)
   at Microsoft.VisualStudio.TestTools.UITesting.ActionExecutorManager.GetActionExecutor(UITestControl uiControl)
   at Microsoft.VisualStudio.TestTools.UITesting.Mouse.ClickImplementation(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)
   at Microsoft.VisualStudio.TestTools.UITesting.Mouse.<>c__DisplayClass6.<Click>b__5()
   at Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1 function, UITestControl control, Boolean firePlaybackErrorEvent, Boolean logAsAction)
   at Microsoft.VisualStudio.TestTools.UITesting.Mouse.Click(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate)
   at Microsoft.VisualStudio.TestTools.UITesting.Mouse.Click(UITestControl control, Point relativeCoordinate)



Peshito
Telerik team
 answered on 24 Dec 2015
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?