.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

How can I stop a WinFormsHosted control from scrolling over my ScrollViewer?

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :WPF
I have a WPF application where the main window contains a NavigatorFrame and a ScrollViewer, like so: <ScrollViewer x:Name="scrollViewer" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" > <MainWindow:NavigatorFrame x:Name="navigatorFrame" Background="{StaticResource windowBackground}" IsTabStop="False" NavigationUIVisibility="Hidden" > .... </MainWindow:NavigatorFrame> </ScrollViewer> I use the NavigatorFrame to display WPF Pages, and one of the Pages contains two WinFormsHost controls that each contain a WinForms SyntaxEditor (from Actipro). Unfortunately, when I try to scroll using the ScrollViewer, the WinForms editors move above the scrollbars and overlap other controls in my application. When I remove the ScrollViewer, the SyntaxEditors go back to behaving (except their Page doesn't have scrollbars). My understanding is that WinFormsHosts have a ZOrder that causes them to appear over WPF elements, which may explain this issue. Nevertheless, I'm wondering if

View Complete Post

More Related Resource Links

Graphs stop displaying in Report Viewer Control after upgrade to SSRS 2008 R2

We are seeing an issue where certain graphs and guages are not being displayed within a report rendered in the report viewer control after we upgraded from SSRS 2008 to SSRS 2008R2.  You can see the graphs and guages render and then disappear from the screen when two other graphs are rendered.  When I export the report to Excel or PDF then all of the graphs and guages are rendered properly. There are a total of 3 graphs and 2 guages on the report - when it completes the rendering process, you can only see two of the graphs displayed in the report viewer control - as I said before, you can see all 3 graphs and 2 guages when exporting to Excel or PDF.  Using Internet Explorer v8.  This problem manifest itself right after the upgrade. Has anyone seen a similar issue? 

Can animation extender be used to replicate Twitter's smooth-scrolling, latest-tweet control?

I'm not going for the exact same control, but if I can find a smart way to automatically/smoothly scroll through text from the database on Timer Tick intervals of 5 seconds... then I can use that as a template. My main idea would be to just dynamically create panels with the text inside of them, then dispose of them when they come towards the bottom of the list... but 3 things stop me 1) it would be a lot of work, 2) when the last panel cycles to the bottom of the display area then how do I make it smoothly disappear? 3) What would I use for the display spot?- a Panel won't work because if its contents exceed the set height, it either just expands to fit it or adds scroll bars. I basically want it to have slideshow functionallity how the images smoothly scroll every few seconds (without the scroll bar), and instead of images I want to use text. Any ideas?

spid3 SQL Server is terminating due to 'stop' request from Service Control Manager

Installing MSDE (SP3) on a clean updated Win-XP system with all the latest fixes installed unsuccesfully. A clean systems means a fresh installed Win-XP, updated all using webupdate. And Excel 2003 installed. Thats all (not even AntiVirus (yet))No UI in the end. Only when examining the Log files at the installation location does show that there was an error: <DateTime> spid3 SQL Server is terminating due to 'stop' request from Service Control Manager is found at the end of the logfile.This error is often encountered by others as found on any respected seach engine on the web. Most have no answer and some say it is because of MDAC. But I got the latest Mdac installed (v2.8 (.1)) RTM. checked it using 'Component Checker' if nothing missing. All seems ok and in place except for MSDE. Anybody?

Creating mixed logo and text scrolling control

Hello I have a scrolling control that I use for text.   After a while, I switched to a picture combining the text messages and a logo in between.  So the process became: 1. Get message. 2. Get logo. 3. Create a picture of the text messages and the logo in between. 4. Scroll the picture. All was in the plain C# language.   My question is if I can do the same with WPF without creating a picture?   Thanks Eli

How to stop Sharepoint Top Link Bar Scrolling when you scroll down vertically

I have a lot of TAB on my main sharepoint page, and when I scroll down vertically, this Top Link Bar go up and disappear from the screen, what I would like to do is this top link bar still remain the same all the time and only some others contents scroll up and down using vertical scroll bar. Could any one help me , how to do this. Thanks David

How to sync a listview control to a scrollviewer


I have two apps, one winform and one WPF, which both use the same code.

On each I have a ListView control.  I have a routine that increments the .SelectedIndex by 1 and performs work on the data for that line in the ListView then goes on to the next.

The ListView control in the WinForm app has its own vert scrollbar and as the program changes the .SelectedIndex the selected line is highlighted and kept visable in the ListView.

In the WPF the ListView does not have its own scrollbar and I have to use a Scrollviewer.  This arrangement does not mimic the WinForm app.  As the ListView items are selected they are highlighted only as long as they are visible on the ListView box.  Once the SelectedItem is beyond teh visable portion of the ListView Control the ScrollViewer does not scroll down to keep it visable.

How do I sink them together so that the SelectedItem is always visable just like the WinForm app????

why doesn't validation control stop application?


I use a validation control to check if value entered is numeric.  When I type letter in the textbox, the error messages shows for a second, then the application continues, and eventually throw exception. 

I'm going to add server side validation in code behind.  But I wonder why the validation control doesn't stop the application.  I don't see any difference between this web form and other web forms where validation controls work fine.

Could somebody tell me what may be the cause?  I'll appreciate your help!

scrollviewer not working in nested User Control


The code below illustrates my problem: I cannot get the scrollbars in the embedded User Control (ucScroll1) to show up when I resize the main window (Window1) smaller.

It won't work even if I force the issue by defining it like this:
<ScrollViewer HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible" IsEnabled="True" >

<UserControl x:Class="ScrollViewerApp.ucScroll1"



 Height="100" Width="300">

 <StackPanel VerticalAlignment="Top">

  <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" >

   <StackPanel Background="Aqua">

    <TextBox Width="100" Mar

How To Judge a Control in ScrollViewer Viewerport



How To Judge a Control in ScrollViewer Viewerport?


and other question,

if there are lots of user control  in ScrollViewer,


How can I improve scrolling performance?

for example,so  slowly?


<Window x:Class="LotsOf.MainWindow"
    Title="MainWindow" Height="300" Width="300"
    <ListBox x:Name="HelloKitty">
          <TextBlock Text="{Binding}" FontFamily="{Binding}"/>
using System.Windows;
using System.Windows.Media;

namespace LotsOf
  /// <summary>
  /// Interaction logic for MainWindow.xaml
  /// </summary>
  public partial class M

Button control to stop Javascript Function on slideshow


Hi everyone-

I've got this slideshow I've pieced together that fades in and fades out.  However, when pushing the Stop Button (same as the Play button) to stop on a slide, the Javascript function continues and fades out so it stops on a blank .  How can I alter this javascript function to only fade in, stop on the slide and not fade out when the stop button is pushed?

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="SlideShow7.aspx.vb" Inherits="SlideShow7" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <style type="text/css">
            margin: 50px 0px;
            padding: 0px;
            text-align: center;
            width: 475px;
            margin: 0px auto;
            text-align: center;
            padding: 20px;
            border: 1px dashed gray;
            background-color: Silver;

Implementing Continuous Scrolling UI Pattern in ASP.NET

When you have numerous records to show, we have to resort to Paging. There is a better alternative to display voluminous data (especially read only data) while providing a better user experience & also making efficient use of server bandwidth - the Continuous Scrolling or Infinite Scrolling UI Pattern. Read on to know more about how to implement Continuous Scrolling UI Pattern in ASP.NET with a GridView.

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

Accessing the different controls inside a GridView control

how we can access a particular control which resides inside a GridView control. In this article I will show you how you can access different controls inside a GridView control. We will see how we can access a TextBox control, a DropDownList control and a ListBox control. If you are working with ASP.NET 1.X then you might want to check out my article Accessing Different Controls Inside a DataGrid.

In-Depth look at the GridView Control

In the last article we looked at few of the new controls available in Asp.net 2.0. We also talked about Grid View Control which has replaced the Asp.net 1.1 DataGrid control for good. In this article we will examine more features of the Grid View control. In this article we will see some of the common operations that can be performed using the GridView control. Apart from these operations there are many more functions that can be performed on the control and which we will see in the later articles

ASP.NET repeater control - databind with style

even used the inline editing features, which I at the time thought was the coolest way possible to write ASP.NET code ( I managed to write code to hide all other rows and only show the current one - the row being edited). With a nice looking EditTemplate it looked indeed very slick but it really turned into giant and hard to manage code behind files.

Creating Paging for a Repeater Control

A common question is "How do I implement paging within a Repeater?" Although the beauty of the Repeater control is its flexibility, you're on your own for building most functions. ASP.NET 2.0 has included some new controls that provide paging, as does the DataGrid in ASP.NET 1.1. However, this tip shows you how to roll your own paging for a simple data viewer.

Using TemplateFields in the GridView Control

The GridView is composed of a set of fields that indicate what properties from the DataSource are to be included in the rendered output along with how the data will be displayed. The simplest field type is the BoundField, which displays a data value as text. Other field types display the data using alternate HTML elements. The CheckBoxField, for example, renders as a checkbox whose checked state depends on the value of a specified data field; the ImageField renders an image whose image source is based upon a specified data field. Hyperlinks and buttons whose state depends on an underlying data field value can be rendered using the HyperLinkField and ButtonField field types.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend