Telerik Forums
UI for WPF Forum
2 answers
195 views

Hi Team,

I have used the RadImageEditor to show the tif images in ListView. When clicking on RadImageEditor, the Selection is not processed in ListView, it is working fine when clicking over TextBlock. How to skip the mouse operations in RadImageEdiotr? Please refer the below code snippet.

 

<ControlTemplate TargetType="{x:Type ListViewItem}">
    <Border x:Name="PART_ImageView"
            BorderBrush="#D3D3D3"
            BorderThickness="1"
            Margin="10">
        <Grid Width="155"
              Height="195">
            <telerik:RadImageEditor Image="{Binding}"  
                                    AllowMouseWheelScaling="False"
                                    HorizontalContentAlignment="Stretch"
                                    VerticalAlignment="Stretch"
                                    Style="{DynamicResource RadImageEditorStyle1}"
                                    ScaleFactor="0"/>
            <Border x:Name="PART_PageNoBorder"
                    Width="24"
                    Height="24"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Bottom"
                    Background="#D3D3D3"
                    BorderThickness="0">
                <TextBlock x:Name="PART_PageNo" FontSize="14"
                           FontFamily="Segoe UI"
                           Foreground="Gray"
                           Margin="4"
                           Text="01"/>
            </Border>
        </Grid>
    </Border>
    <ControlTemplate.Triggers>
        <Trigger Property="IsSelected" Value="True">
            <Setter TargetName="PART_ImageView"
                    Property="BorderBrush"
                    Value="#1ba1e2"/>
            <Setter TargetName="PART_PageNoBorder"
                    Property="Background"
                    Value="#1ba1e2"/>
            <Setter TargetName="PART_PageNo"
                    Property="Foreground"
                    Value="#FFFFFF"/>
        </Trigger>
    </ControlTemplate.Triggers>
</ControlTemplate>

 

Regards,

Antony Raj

Milena
Telerik team
 answered on 13 Feb 2017
2 answers
155 views

I am building a WPF form and using Telerik WPF 2017.1.117.  I have a pdf loading fine from an external URL, but when I call the .Print command nothing is spooled and no errors are generated.  After searching as much as I could, I can't find anything that would show why what I have is not working.  Thanks for any help you can provide.

 

using (WebClient client = new WebClient())
{
using (Stream ms = new MemoryStream(client.DownloadData(Properties.Settings.Default.URL + badgeURL)))
{
MemoryStream mStream = new MemoryStream();
mStream.SetLength(ms.Length);
ms.Read(mStream.GetBuffer(), 0, (int)ms.Length);
this.radPDF.DocumentSource = new PdfDocumentSource(mStream);
}
}

this.radPDF.Print(new PrintSettings("Document 1", true));

Jeff
Top achievements
Rank 1
 answered on 13 Feb 2017
0 answers
171 views

I've encountered a strange issue regarding the GridViewPinButton visibility in RadGridView.

My only wish is to disable this functionality- to set the GridViewPinButton visibility to collapse in every row in RadGridView.

Now, I have one place where it works great and another one where I can see this button while I'm hovering the rows.

In both places I haven't written any code concerning the GridViewPinButton , and in both cases the visibility of the button is set to collapsed.

The only difference I can see is in snoop (images are attached):
When it works well, GridViewPinButton does not have any child elements, while it has them in the second case.

 

When I click the button, I get the error:
Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "Telerik.Windows.Controls.GridView.Strings.resources" was correctly embedded or linked into assembly "Telerik.Windows.Controls.GridView" at compile time, or that all the satellite assemblies required are loadable and fully signed.
 at System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName)
   at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
   at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.GetBlockAndPosition(Object item, Boolean deletedFromItems, GeneratorPosition& position, ItemBlock& block, Int32& offsetFromBlockStart, Int32& correctIndex)
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.OnItemReplaced(Object oldItem, Object newItem, Int32 index)
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
   at System.Windows.WeakEventManager.ListenerList.DeliverEvent(Listener& listener, Object sender, EventArgs args, Type managerType)
   at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
   at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
   at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnPinnedItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.AddToPinnedItems(Object item)
   at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
   at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
   at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
   at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
   at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
   at System.Windows.Input.CommandManager.TransferEvent(IInputElement newSource, ExecutedRoutedEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
   at System.Windows.Controls.Button.OnClick()
   at Telerik.Windows.Controls.RadButton.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

Dmitri
Top achievements
Rank 1
 asked on 13 Feb 2017
2 answers
641 views

Hi,

I have a treeview that uses the datatemplate shown below. It has a context menu. I'd like to be able to disable or hide certain items depending on which node in the tree they click on. Is this possible? If so, can someone share some example code of how to do this in an MVVM fashion?

Thanks ... Ed

 

 

<HierarchicalDataTemplate DataType ="{x:Type vm:AttachmentContainer}"  ItemsSource="{Binding Children}">
    <TextBlock Text="{Binding Name}" >
           <telerik:RadContextMenu.ContextMenu>
                <telerik:RadContextMenu  Opened="tv_ContextMenuOpened" >
                    <telerik:RadMenuItem x:Name="icon" Header="Upload File"   >
                        <telerik:RadMenuItem.Icon><Image Source="/Images/Upload.png"/></telerik:RadMenuItem.Icon>
                    </telerik:RadMenuItem>
                     <telerik:RadMenuItem Header="New Folder" >
                        <telerik:RadMenuItem.Icon>
                            <Image Source="/Images/NewFolder.png"/>
                        </telerik:RadMenuItem.Icon>
                     </telerik:RadMenuItem>
                     <telerik:RadMenuItem Header="Delete Folder" >
                        <telerik:RadMenuItem.Icon>
                            <Image Source="/Images/DeleteSmall.png"/>
                        </telerik:RadMenuItem.Icon>
                     </telerik:RadMenuItem>                               
                </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
    </TextBlock>
</HierarchicalDataTemplate>
Randy Hompesch
Top achievements
Rank 1
 answered on 13 Feb 2017
1 answer
124 views

So, I have a RadDock setup. In the hosting main window there is a radmenu followed by a  radtoolbar where I have a toolbarbutton for saving. Below that I have a raddocking that has a pane that hosts my usercontrol that contains, among other things a the RadDateTimePicker shown below. It works great except in one odd condition. If the txtClosedDate has a valid value and the user blanks it out and then hit's the button in the toolbar without clicking or tabbing to another field, the null value is not bound back to the source and my viewmodel receives the original date value instead of null. If, however, the user goes to any other field on the user control, thereby forcing a lost focus event the correct binding happens. I have hacked around the problem with the following code, but I think you boys need to fix this on your side.

Thanks ... Ed

 

// this is a awful hack to work around a bug where, when the raddatetimepicker's text is cleared and the
// user clicks on the save button in the toolbar (which is outside the usercontrol), the bound value does not get updated properly.
// it works fine when going from an empty state to a valid date, just not the other way around.
private void txtClosedDate_KeyUp(object sender, KeyEventArgs e)
{
    if (string.IsNullOrWhiteSpace(this.txtClosedDate.CurrentDateTimeText ))
    {
        this.txtClosedDate.SelectedValue = null;
        var binding = this.txtClosedDate.GetBindingExpression(RadDateTimePicker.SelectedValueProperty);
        binding.UpdateSource();
    }
}

 

<telerik:RadDateTimePicker x:Name="txtClosedDate" Width="175" Grid.Row="2" Grid.Column="3"
      HorizontalAlignment="Left"     CalendarStyle="{StaticResource calendarStyle}"
          InputMode="DatePicker" SelectedValue="{Binding Request.ClosedDate, Mode=TwoWay,
     UpdateSourceTrigger=PropertyChanged }"
           KeyUp="txtClosedDate_KeyUp"
/>

 

NOTE THAT THIS STYLE IS AT THE APP RESOURSE LEVEL. I Doubt it has anything to do with the problem.

<Style x:Key="calendarStyle" TargetType="telerik:RadCalendar" BasedOn="{StaticResource RadCalendarStyle}">         <Setter Property="AreWeekNumbersVisible" Value="False" ></Setter>     </Style>
Kalin
Telerik team
 answered on 13 Feb 2017
3 answers
127 views

Hi,

I have a tree that is bound and load on demand.

For simplicity say I had:

 

Randy Hompesch
Top achievements
Rank 1
 answered on 13 Feb 2017
1 answer
152 views

Hi,

Is there a quick way to expand a branch to the leaves programmatically for a load on demand scenario?

Thanks ... Ed

 

Martin Ivanov
Telerik team
 answered on 13 Feb 2017
9 answers
468 views
Hi,

I want to split the progress bar. i.e Upto particular point i want one color, remaining will be another color.

For example with following code

<

 

 

telerik:RadProgressBar x:Name="pb" Width="220" Height="15" Minimum="0" Maximum="100" Value="10" Margin="40,4,0,4" />

 

 

 

Upto say value=30 i want grey color and above that point i need default color.

Please suggest/provide sample code.

Regards

Sreeju

 

Arvind
Top achievements
Rank 1
 answered on 12 Feb 2017
5 answers
337 views

Hi,

I have two questions:

1- is it possible to set the default value of the zoomcontroller to "automatic" instead of 100 %?  if possible in XAML, or in code-behind is necessary

 

2- is there a way (documented or code snippet) so I can filter the export format (i.e.: I only want PNG files)

 

Thanks

Louis-Guillaume
Top achievements
Rank 1
 answered on 11 Feb 2017
1 answer
157 views

Hey,

Is there way to disable cutting letters from PDF? When I am loading PDF file it is cutting polish words, is there any chance to avoid this?

 

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 10 Feb 2017
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
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?