Telerik Forums
UI for WPF Forum
4 answers
148 views
Hello, when selecting a cell, the row is highlighted. I would like to have the cells on selection by column, not by row. I'm using dynamic columns, so I'm not sure how to do this. I tried e.Cell.Background = Brushes.Red; at the cell level but the colors didn't change.

Thanks,
Scott
Yoan
Telerik team
 answered on 18 Nov 2013
1 answer
111 views
Hi I am currently evaluating telerik silverlight controls. In richtextbox if try to type using google input tools for unicode inputs such as hindi, marathi I am facing cursor alignment issue. When i type one word its fine but next word comes to left of first word instead it should be at right of first word. 
Petya
Telerik team
 answered on 18 Nov 2013
1 answer
51 views
Hallo,
I add a custom context menu to schedule view. 
When I click over a slot (empty slot or not) I need retrieve current resource where the slot is in.
How can I do that?

Thanks
Rosi
Telerik team
 answered on 18 Nov 2013
1 answer
219 views
We are using the RadGridView with a VirtualQueryableCollectionView as Itemsource using WPF and EF. 
This works great for paging and scrolling, however we can't figure out how to deal with the following situation:

- We sort the grid by a property, name for instance. 
- Then, outside of the grid, the name property is altered
- Our viewmodel receives a message that the item has changed

What we want to do now, is to refresh the grid, with the current item still selected.
However, since the name has changed, we don't know the index that has to be queried to get the item with the id of the changed item.

So the question is: knowing the ID of an entity, how can you make VirtualQueryableCollectionView load the item with that ID into the grid?The same situation arises when we want to select a entity (with known id) that has been newly created outside of the viewmodel.


We use the following VirtualQueryableCollectionViewHelper to create the set the VirtualQueryableCollecitonView.

 QueryGenerator(QueryableXenoxContext) returns an EntityQuery


public class VirtualQueryableCollectionViewHelper<T> where T : Entity
{
    public IEventAggregator EventAggregator { get; set; }
    public VirtualQueryableCollectionViewHelper(Func<QueryableXenoxContext, EntityQuery<T>> queryGenerator, queryableXenoxContext queryableXenoxContext, XenoxGridView gridView)
    {
        EventAggregator = ClientIocContainer.Instance.GetExportedValue<IEventAggregator>();
        QueryGenerator = queryGenerator;
        QueryableXenoxContext = queryableXenoxContext;
        GridviewControl = gridView;
        DoNothing = i => { };
 
        View = new VirtualQueryableCollectionView<T>
        {
            LoadSize = 30,
            VirtualItemCount = 100
        };
 
        View.ItemsLoading += (sender, args) => LoadInternal(args.StartIndex, args.ItemCount, DoNothing);
 
 
        View.FilterDescriptors.CollectionChanged += (sender, args) => LoadInternal(0, View.LoadSize, DoNothing);
        View.FilterDescriptors.ItemChanged += (sender, args) => LoadInternal(0, View.LoadSize, DoNothing);
        View.SortDescriptors.CollectionChanged += (sender, args) => LoadInternal(0, View.LoadSize, DoNothing);
 
        if (gridView == null)
        {
            ScrollIndexIntoView = DoNothing;
        }
        else
        {
            ScrollIndexIntoView = i => gridView.ScrollIndexIntoCenterOfView(i);
        }
    }
     
    public void Load(int currentIndex, int pageSize)
    {
        LoadInternal(currentIndex, pageSize, ScrollIndexIntoView);
    }
 
 
    public void Refresh(bool scrollToIndex = false, int currentIndex = 0)
    {
        var postLoadAction = scrollToIndex ? ScrollIndexIntoView : DoNothing;
        LoadInternal(currentIndex, View.LoadSize, postLoadAction);
    }
 
    public IEnumerable<T> GetAllCollectionItems()
    {
        return QueryableXenoxContext.Load(QueryGenerator(QueryableXenoxContext)).Entities;
    }
 
    private void LoadInternal(int currentIndex, int pageSize, Action<int> onLoaded)
    {
        if (currentIndex < 0) currentIndex = 0;
        //also load content above current item
        pageSize = pageSize*2;
        var loadStartIndex = currentIndex - pageSize / 2 < 0 ? 0 : currentIndex - pageSize / 2;
 
        var entityQuery =
            QueryGenerator(QueryableXenoxContext)
                .Sort(View.SortDescriptors)
                .Where(View.FilterDescriptors)
                .Skip(loadStartIndex)
                .Take(pageSize);
 
        entityQuery.IncludeTotalCount = true;
 
        try
        {
            QueryableXenoxContext.Load(entityQuery, LoadBehavior.RefreshCurrent, lo => {
                if (lo.TotalEntityCount != -1 && lo.TotalEntityCount != View.VirtualItemCount) {
                    View.VirtualItemCount = lo.TotalEntityCount;
                }
 
                View.Load(loadStartIndex, lo.Entities);
 
                onLoaded(currentIndex);
            }, null);
        }
        catch (InvalidOperationException)
        {
            EventAggregator.Publish(new ErrorReportedEvent("Error loading items. Possible cause: too many items selected"));
        }
    }

Dimitrina
Telerik team
 answered on 18 Nov 2013
6 answers
199 views
Hi,

i got an error while the busy indicator is busy over the radtreelistview gridviewrow background. What can i do to remove the gray area?

Please have a look on my attached file radtreelistview_busyindicator.png.

Thanks for your help.
Vanya Pavlova
Telerik team
 answered on 18 Nov 2013
5 answers
143 views
Hello. I have a problem with row double click. I use next code:

protected override void OnMouseDoubleClick(MouseButtonEventArgs e)
        {
            var element = InputHitTest(e.GetPosition(GetRowForItem(SelectedItem)));
            if (element != null)
            {
                if (DoubleClickCommand != null && DoubleClickCommand.CanExecute(DoubleClickCommandParameter))
                    DoubleClickCommand.Execute(DoubleClickCommandParameter);
            }
                 
            base.OnMouseDoubleClick(e);
        }

And some times InputHitTest return null. I can see that it happens when I scroll (Horizontal) to the right to the columns which aren't located in visible area. But if I resize gridView and some new columns will be located in visible area, InputHitTest will return right value. (My visual tree = RadDocumentPane -> ScrollViewer -> Canvas -> ContentControl -> RadGridView) Thanks.
Nick
Telerik team
 answered on 18 Nov 2013
5 answers
382 views
Hello,
I have a RadWindow with just a label and a textbox :

<telerik:RadWindow x:Class="TestWpf.MainWindow"    
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"    
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"    
        xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"    
        Header="Test" Width="400" Height="200"    
        FocusManager.FocusedElement="{Binding ElementName=tbxUser}">     
    <Grid>    
        <Label Content="User : " Height="28" Name="lblUser" />    
        <TextBox Height="23" Name="tbxUser" Width="120"/>     
    </Grid>    
</telerik:RadWindow> 

When I open the window I would have the focus in the textbox. So I add the FocusManager.FocusedElement attribute to the RadWindow but it doesn't work.
If I transform RadWindow to standard Window it works.
Is there another way to do this ?

Thanks in advance for your answer.
Dan
Top achievements
Rank 1
 answered on 17 Nov 2013
9 answers
222 views
Is there a way to rotate child shapes inside of a rotating container? The idea is to keep the children of the container laid out exactly the same as the container is rotated. An additional complication is that I need to be able to select the child shapes.

This second requirement is tricky because it essentially eliminates the easy solutions -- i.e. Ellipses/Rects inside the container instead of RadDiagramShapes. 

Right now, my idea is to hook the OnRotationAngleChanged method in the RadDiagramContainer and then iterate through the children and apply a RotateTransform to the children.
 
protected override void OnRotationAngleChanged(double newValue, double oldValue)
        {
            base.OnRotationAngleChanged(newValue, oldValue);
 
            List<RadDiagramShape> childrenList = Children.OfType<RadDiagramShape>().ToList();
 
            // get rotation center
            double centerX = (ActualWidth / 2);
            double centerY = (ActualHeight / 2);
 
            foreach (RadDiagramShape item in childrenList)
            {
                RotateTransform transform = new RotateTransform(newValue, centerX, centerY);
                item.LayoutTransform = transform;
            }
        }

The idea here is that I would use the container center as the rotation origin and just have the children rotate around that point. That didn't work - in fact, it seems any values supplied as centerX/centerY produce the same behavior, which makes me think that the container might be doing some coercing of the child during layout. 

Am I making this way too hard? 



Zarko
Telerik team
 answered on 15 Nov 2013
3 answers
180 views
We have a scenario where we would like to float panels over the top of a background map. When dragged to a corner of the map we would like the panel to dock to the corner whilst remaining on top of the map. Subsequent panels would then dock (or stack) to the sides of this panel, whilst providing resize behaviour. Can this be achieved with radDocking control?
Vladi
Telerik team
 answered on 15 Nov 2013
3 answers
241 views
Hello,
when using the Office2013 theme the text in a TextBlock is smaller as that for a RadButton or a CheckBox.
Is it by design or is it a bug?
Patrick
Petya
Telerik team
 answered on 15 Nov 2013
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
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
Licensing
WebCam
CardView
DataBar
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
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?