Telerik Forums
UI for WPF Forum
1 answer
81 views
Hi, RichTextBox is not the list of supported controls for CodedUI, can we expect the support in future, if yes? What could be the
Tanya
Telerik team
 answered on 08 Mar 2018
1 answer
121 views

Hello!

I accidentally click the release button so that "https://www.telerik.com/forums/ribbonwindow-no-transparent", I want to help delete it.

 

I use the Material theme in my RibbonWindow.

When I Producing my program.The window has a White border.

I compare it to demo,It seems to be a shadow, but it's no transparent.

I tried to modify the transparency of the window. The window was not transparent, and all the colors were white.

I think the problem is that transparency is replaced by white, what should I do to correct this problem

 

Martin Ivanov
Telerik team
 answered on 07 Mar 2018
1 answer
111 views

When the PDFViewer is using FixedDocumentPagesPresenter it tends to change position (it jumps to different pages) when a page is rotated and the same thing can also occur when zooming in/out.

To see this, simply open any PDF with more than a few pages - the one I'm currently testing with has 18 pages, move away from the first few pages (e.g. go to page 12), and rotate the page. The position jumps several pages and is restored if you rotate 360 degs.  In my test doc, it jumps to page 16 when rotated 90 / 270 degrees and back to page 12 when rotated 0 / 180 degrees.

There's a similar problem when zooming in, but I think you need a document with a few hundred pages to see this.

It all seems to be fine when using FixedDocumentSinglePageViewPresenter.

Any chance you can fix this?

Thanks.

Deyan
Telerik team
 answered on 07 Mar 2018
3 answers
753 views
I would like to determine how many distinct values are shown in a grid column after filtering is applied.

The filter parameter (true) in grid.GetDistinctValues(column, true, null) considers the other columns (but not the specified column).  So this method returns every distinct value for the considered column and is not restricted to just those distinct values that are actually shown in the column as a result of the filtering currently applied to that column as well as to the other columns.

So this method doesn't suit my purpose.

I would like to know the number of distinct values actually shown in a column to support the following two scenarios.  (1) If there are zero distinct values displayed in a column, then the last filtering operation over-constrained the result set and can be undone (with user notification).  (2) If there is only one distinct value, then the column can be hidden and the column-header/single-unique-value pair can be transferred to a "common values" grid.

This approach works well with our datasets.  As the user applies filtering operations, an 8000 row, 65 column datasource typically gets reduced to about 20 rows and 5 to 10 columns each containing more than one distinct value.  All other single-valued columns are displayed in an adjacent common-values grid.

In the grid.FilterDescriptors.CollectionChanged event, I invoke the method which consolidates the common-values.  For this method, I need to know if there is only one distinct value.

Many thanks!
jamsheer
Top achievements
Rank 1
Veteran
 answered on 07 Mar 2018
0 answers
134 views
I Have a WindowsService project.In this service when I render any UserControl, the png file is empty.

for test i write the following code to export a TextBlock but result is an empty png file.

protected override void OnCustomCommand(int command)
{
    Export();

    base.OnCustomCommand(command);
}

private void Export()
{
    var thread = new Thread(() =>
    {

        var grid = new Grid();
        grid.Children.Add(new TextBlock() { Text = "ExportTest", FontSize = 60, Background = Brushes.Red, Foreground = Brushes.Blue });
        double widthg = grid.Width > 0 ? grid.Width : 1024;
        double heightg = grid.Height > 0 ? grid.Height : 768;
        grid.Measure(Size.Empty);
        grid.Measure(new Size(widthg, heightg));
        grid.Arrange(new Rect(0, 0, widthg, heightg));
        grid.UpdateLayout();

        var bitmap = new PngBitmapEncoder();
        ExportExtensions.ExportToImage(grid, @"..\ExportTest.png", bitmap);
    });

    thread.SetApartmentState(ApartmentState.STA);
    thread.Start();
    thread.Join();
}

Note: when I run the export function in wpf project, it works perfect.

there is my project:
http://www.mediafire.com/file/aij5sg4zx80yc73/ExportProject.rar
any body can help me?
Ahmad
Top achievements
Rank 1
 asked on 06 Mar 2018
2 answers
73 views

It seems like there's a limitation to Cluster locations and a bug regarding its Bounds. I noticed that the location of a Cluster is always at the location of the first item added to it. I would expect that it actually would be at the center of all added items. Looking at the ClusterData.Add method it seems like it would be easy to update the Cluster-location there since the bounds are updated each time a new item is added. I tried solving it by overriding the DefaultClusterGenerator like the code below, but then I noticed that the calculation for the Bounds are actually wrong in the ClusterData.Add method. The last Math.Min should be a Math.Max. In the end I had to calculate the Bounds myself, and then update the Cluster Location.

 

public class ClusterGenerator : DefaultClusterGenerator
 
{
    public override ClusterData CreateCluster(Location center, object item)
    {
        var clusterData = base.CreateCluster(center, item);
        clusterData.AutoCalculateBounds = true;
 
        clusterData.PropertyChanged += this.ClusterDataOnPropertyChanged;
        return clusterData;
    }
    private void ClusterDataOnPropertyChanged(object sender, PropertyChangedEventArgs args)
    {
        // Check if an item has been added or removed
        if (args.PropertyName == nameof(ClusterData.Count))
        {
            var clusterData = sender as ClusterData;
            if (!clusterData.Bounds.IsEmpty)
            {
                clusterData.Location = clusterData.Bounds.Center;
            }
        }
    }
}
Petar Mladenov
Telerik team
 answered on 06 Mar 2018
10 answers
119 views

Your Q1 2016 example references the "MyFilterDescriptorBindingBehavior" in the "Example.xaml" file of the "DataFilter.Default Filter Editors" example.  However, that is nowhere to be found.

I need to add a FilterDescriptor using code that is displayed in the control for the user to interact with.  This seems like the example that would cover the scenario but the documentation is incomplete.  Can you help me with this?

 Joel

Stefan
Telerik team
 answered on 06 Mar 2018
1 answer
92 views
I want to have a slightly different edit behavior depending on what the edit trigger is, e.g. F2/click vs just typing. Is there anyway to determine this information with the objects and events available?
Vladimir Stoyanov
Telerik team
 answered on 06 Mar 2018
1 answer
109 views

I have a RadTreeView built using Hierarchical self-referenced data, positioned within a popup. There is an EventToCommandBehaviour built within the Tree exactly as:https://www.telerik.com/forums/doubleclick-in-mvvm-databound-treeview

I am getting no response at all from the event, if I change the control to a ListBox then the event triggers?

Can anyone shed any light on what could be happening.

I have tried various EventName's [Selected, MouseLeftButtonUp, ItemClick, ItemDoubleClick...] nothing triggers it on the RadTreeView

Positioning the Tree directly onto the Page, outside of the Popup - there is still no response to the Event.

 

Martin Ivanov
Telerik team
 answered on 06 Mar 2018
1 answer
183 views

Hello! Team,

We have a WPF window in which we're using multiple RichTextBoxes (RTB). We encountered an object reference error while editing text in one of the rtb. Stack trace log attached.

Date Time : 2/27/2018 2:22:12 PM ,
User Name : XXXXXXXX,
NameSpace : Telerik.Windows.Documents.UI ,
Class Name : Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter ,
Method Name : UpdateCaretStyle ,
Exception Message : Object reference not set to an instance of an object. ,
Error Trace :    at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.UpdateCaretStyle()
   at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.UpdateCaretSize()
   at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.DoOnCaretLocationChanged()
   at Telerik.Windows.Documents.Utils.SuspendChangingAndChangedActionCounter.InvokeChangedActionInternal()
   at Telerik.Windows.Documents.Utils.SuspendChangingAndChangedActionCounter.InvokeChanged()
   at Telerik.Windows.Documents.DocumentPosition.OnLocationChanged(Boolean changesCursorInitialLocation)
   at Telerik.Windows.Documents.DocumentPosition.CallOnPositionChanged(Boolean changesCursorInitialLocation)
   at Telerik.Windows.Documents.Selection.MouseSelectionHandler.SetDocumentPosition(DocumentPosition documentPosition, Point position, Boolean moveToNextIfOutOfBox)
   at Telerik.Windows.Documents.Selection.MouseSelectionHandler.RegisterDocumentMouseDown(Boolean ctrlPressed, Boolean shiftPressed, Point position, UIElement originalSource, SourceType source)
   at Telerik.Windows.Documents.UI.DocumentPresenterBase.HandleMouseLeftButtonDownOnPosition(Point position, UIElement originalSource, SourceType source)
   at Telerik.Windows.Documents.UI.DocumentPresenterBase.Owner_MouseLeftButtonDown(Object sender, 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) Inner Exception:
SourceFilePath: c:\Builds\13\AppPath\App.xaml.cs

 

RTB configuration:

<telerik:RadRichTextBox x:Name="txtContent" IsFocusable="True" PreviewKeyDown="txtContent_PreviewKeyDown"
                         AutomationProperties.AutomationId="{Binding TagValue,StringFormat=Comment_{0},RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
                         BorderThickness="0" BorderBrush="White" IsSpellCheckingEnabled="True"
                         DocumentInheritsDefaultStyleSettings="True"
                         GotFocus="txtContent_GotFocus" LostFocus="txtContent_LostFocus"
                         DocumentContentChanged="txtContent_DocumentContentChanged"
                         HorizontalContentAlignment="Left"  IsContextMenuEnabled="True"         
                         MouseLeave="txtContent_MouseLeave"
                         PreviewMouseRightButtonDown="txtContent_PreviewMouseRightButtonDown"
                         KeyDown="txtContent_KeyDown"
                         Background="Transparent" FontFamily="Georgia (Body)"
                         IsSelectionMiniToolBarEnabled="False"
                         AcceptsReturn="True" ScrollViewer.VerticalScrollBarVisibility="Auto"
                         ScrollViewer.HorizontalScrollBarVisibility="Auto" Tag="{Binding TagValue}"
                         MouseMove="txtContent_MouseMove" >
</telerik:RadRichTextBox>

 

Another issue with this exception is that we're not able to isolate exact steps to reproduce the issue.

As is seen in the logs the exception is not coming from any of our custom methods, its coming from some inbuild dll method of telerik. So, please suggest what could be causing this issue.

 

Regards

Tushar

Tanya
Telerik team
 answered on 06 Mar 2018
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
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
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?