Silverlight Project With Tabcontrol Hosting Canvas Objects : Can't Get Vertical Bar To Hide Even When Lots Of Room

Aug 11, 2011

Silverlight project with tabcontrol hosting canvas objects. I want to wrap my entire tabcontrol with a scrollviewer so that on a short display you can scroll vertically to see the whole area on my canvas.When I run my project my scrollviewer vertical bar is always showing even when there's more room vertically than needed for a scrollbar.

All I am trying to accomplish here is a min resolution of 1280x768 to be scrollable and anything bigger than that have the scrollbars hide. My laptop is only 768 tall, but my canvases were developed with 1280x1024 in mind. So I would like a way to set this up so that everyone can scroll or just see the canvas all at once depending on their resolution.

Anyone have any ideas why it is always visible? I've tried setting canvas width and height. I tried setting stretch on alignments on the outer grid. Saw both those tips while searching other issues similar to mine.

Some code:

<Grid x:Name="LayoutRoot" MinHeight="768" MaxHeight="1024" MinWidth="1024" MaxWidth="1280" Background="#FF6A6868" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.775*"/>

[code]....

....lots of child canvas items in my "Main Floor" canvas. Child canvas objects contain lots of path objects. None which are taller or wider than the main floor canvas width/height.

<sdk:TabItem Margin="0" Header="Mezzanine">
<Canvas x:Name="Upstairs" HorizontalAlignment="Left" Height="1000" UseLayoutRounding="False" VerticalAlignment="Top" Width="1280">

..another tab. Same deal with child canvas objects.

View 1 Replies


ADVERTISEMENT

Silverlight: Hide Objects/user Controls Within Wrappanel?

Mar 5, 2012

I've got a WrapPanel which will contain several different custom UserControls. Depending on the scenario, I may need to filter down which UserControls are visible. My goal is that I can switch which controls are visible on the fly by showing/hiding the controls that need to be filtered - thus shifting the controls that are left showing, to the top-left of the panel.

Right now I am simply setting the Visibility property of the control to Visibility.Collapsed when I don't want them to appear. I thought that because I was using a WrapPanel, the rest of the controls would shift to the top-left of the panel.Instead, after hiding some of the UserControls, the controls that are still visible stay exactly where they were before, and I am left with gaps between the controls that are still showing. I've opened my app in Silverlight Spy, and it shows that the UserControls are still actually there (which makes sense) but are simply invisible.

So my question is: Is there a way that I can show/hide UserControls within a WrapPanel which allows the still-visible UserControls to slide to their new positions (all shifting towards the top left - similar to a StackPanel)?

I've debated removing the UserControls completely from the WrapPanel (I think this would work) and storing them in memory until they are needed. Then if I wanted to show/hide other controls, I would get them from my in-memory object. It seems like there should be a better way to do this though.

UPDATE:

XAML: (very simple)
<toolkit:WrapPanel x:Name="MyLayout" Height="300" HorizontalAlignment="Left" VerticalAlignment="Top" Width="400" />
Code-Behind: The UserControls are getting added dynamically:
MyLayout.Children.Add(oUserControl)

And they are getting set to collapsed dynamically as well:

oUserControl.Visibility = Visibility.Collapsed

View 1 Replies

Drawing A Line In Silverlight / Canvas Width Is Invalid

Mar 17, 2011

I'm trying to make a very simple Silverlight application.I want it to be full-screen, and I want to draw a line onto a Canvas.My problem is that the .Width and .Height of the canvas never seem to have a valid value. The website shows the canvas at 400x300 pixels or so, and when you click on it, it goes into Fullscreen mode.I want to use the Height and Width to find the usable space of the screen. I've tried adding events (thinking that the canvas wasn't yet ready to be used immediate after the full-screen line of code) but the LayoutChanged and Resized events don't seem to yield anything.

View 1 Replies

.net Lots Of Undisposed Cursor Objects?

Feb 15, 2008

I am in the process of writing a program that converts large number of records from one format to another. When doing some testing on it, to make sure I don't have any memory leaks, I am noticing a large number of undiposed cursor objects. I am not sure what to do with these. My program seems to run fine, however on some computers I am getting issues when the process is complete.

What happens is this. The program starts up, the user sets up the configuration options, it does it's processing, it creates a HTML report and launches IE (or whatever their default browser is) to display it. Then the program goes back to its Config display.

[Code]...

View 2 Replies

Vertical Tabcontrol Custom Component?

Dec 4, 2011

I need a vertical tabcontrol similar to the one in the above image.Is there one already made (free or paid)?

I tried google but didn't find anything.

View 1 Replies

Anything Wrong With Using Lots Of Shared Methods And Objects

Jul 9, 2009

I seem to find more and more that I declare a lot of objects or methods as Shared now but it feels like I am not doing things properly.I try to avoid doing this but then I just end up with situations where I have to create an instance of a class just to call one method that would act no differently if it was just a shared method.Basically I'm just wanting to know if there is any good reason to avoid using Shared objects/methods. Obviously I dont declare EVERYTHING as shared, but it just seems to make things a lot simpler most of the time.For example in my current project (a chat application using WCF) I have a class just called Core which houses a lot of the main functions of the client program, so it has methods such as: SignUserIn, SignUserOut, SendMessage, MessageReceived etc and it also holds properties such as a list that contains all of the currently online users. These things are all declared Shared in my program because as far as I can see there is no reason for having to do this:[code]

View 15 Replies

[2008] MDI TabControl Container - TabGroups (Vertical / Horizontal)?

Jan 6, 2009

I'm trying to make an MDI TabControl Container usercontrol, which is used instead of the MdiClient control in an MDI application. Instead of MDI Forms, you can use (modified) TabControls that behave like (maximized) MDI Forms in a Tabbed environment.

A great example is of course the Visual Studio IDE. Each window is just a TabPage on a TabControl (at least it looks like it is, I don't know exactly how it works in the IDE.. but let's assume it is).Now, the VS IDE uses some great functionality which I believe is called TabGroups. By Right-clicking (or dragging it into nothingness) a TabPage 'header', you can choose New Horizontal / Vertical Tab Group, which splits the 'container' into two TabControls, each with their own TabPages, with a splitter in between so you can resize them.

I have been trying to recreate this behaviour, and I must say it works pretty well so far for very little effort. The only (major) downside is, it only works for Vertical OR Horizontal TabGroups. I have no idea how I can possibly make it work using both vertical and horizontal TabGroups simultaneously...

What I did is pretty simple: I have a mdiTabControlContainer which is just a blank UserControl. I made a public property TabControls that returns a (custom) mdiTabControlCollection (inheriting from a generic Collection(Of mdiTabControl) which is basically just a collection of my tabcontrols.

When the collection is modified, I call a RedrawTabControls method which first clears the Controls (deletes all TabControls), and then adds them one by one. First the last in the collection (docked Fill) then the rest docked Left. I also add a splitter between each TabControl. (Code at the bottom)If I dock the TabControls to "Top" for example, I can make it Horizontal. But I have no idea how I can possibly dock a few of them to Left and the other few to Top...? I would need some kind of property that determines which TabControl should be docked where, right? But how and when would I set that property?

The code I'm using now is:

vb.net
Imports System.Collections.ObjectModel
Public Class mdiTabControlContainer
Public Sub New()

[code]....

View 1 Replies

Stuck Saving Lots Of Strings To Read Later On In VB Project?

Sep 11, 2010

i am working on a project where i select from a list box what entry i want to change (out of a set of 27)and then i have to select the entry, enter the details in the text box, hit ok and then i was trying to make it store the string it made under a deceleration.

View 4 Replies

Hide Tabs From Tabcontrol?

Jan 22, 2009

I am having tabcontrol in which i want only to hide tabs.Consider i am having 2 tabpages. I want to hide only tabs of tabcontrol not tabpages.Then i will show the tabpages with this coding on button click.TabControl1.SelectedIndex = 1

View 5 Replies

Hide Tabs In A Tabcontrol?

Jan 29, 2012

Ive seen some discussion on here about how to hide tabs in a tabcontrol but they all seem to be in C or some variant. I havent seen one for vb.net (i cant do C)

What i want to do is hide or disable all some of the tabs till the user has logged in. Ive sorted out the login and logout. All i need to do is add the code to enable/disable some tabs until the user has logged in.

View 2 Replies

Tabcontrol Click To View/hide Label?

May 13, 2009

i have a form with a tab control and two tabs and a label below the tabcontrol.. in tab one i'm editing files and such and the label below the tabcontrol shows the directory of the file i am working on.. what i would like, is to have that label not be visible when i click on tabpage 2..

so basically, i need the code for the tabpage select. like when when you click a different tab, a different command applies..

View 4 Replies

Use A Page Frame (like A TabControl) And Hide The Tabs?

Aug 31, 2009

One of the great features of Page Frames in the now discontinued FoxPro language was that you could use a Page Frame (like a TabControl) and hide the tabs. The nice thing about this was that if you wanted (for example) to have simulated "frames" you could use a Page Frame control, hide the tabs, and that gave you endless frame that you could then access programmatically.I need to do something along the same lines. To further illustrate, if you look at any configuration screen in Office 2007, they all have a ListBox on the left, and then clicking on those Listbox selections brings up "frames" on the right with what you want to work with.This is the effect I want to create - but in .NET I cannot see a good control to use.

Panels - these seemed a good idea at first, but even when set to Visible and not Visible these frames hide each other so they dont seem like they will work.

GroupBoxes - Tried these but the same problem as with panels.

TabControl - Tried this, and it works great - but I DONT want the Tabs. Instead I want non-tabbed pages, that would then be like frames.

What is the best control to use? And, can I hide the Tabs somehow in the TabControl?

View 11 Replies

VS 2008 : Using TabControl And Button To Display Objects?

Apr 18, 2011

I am currently working on an OOP assignment based on vehicles as classes. The classes, attributes and object lists have been completed so far. In my main menu form, I have a tabControl from which each page displays is related to each class. Within each page, labels are included displaying attributes of the first related object in the list. There are also two buttons in each page for scrolling between each listed object from the same class. I want these forward/back buttons to be able to retrieve attributes from the next object in the object list and have them displayed in their relevant labels.

View 3 Replies

.Net Silverlight Project And MySQL?

Mar 20, 2012

I have found the MySQL .NET Connector - am I correct that this is not compatible with Silverlight and I do not need it?I understand I must use a Web Service for this. Can I use WCF or WCF RIA, or am I best using a more traditional web service method like REST or SOAP?

What's the best web service method for many quick queries (such as updating a search as the user types in the keywords)Do I have to use technology like LINQ, Entity SQL, ADO.NET Framework, or a stored procedure? Is one of these the best way to do it or should I just skip them all and create a simple web service?What's the best source to learn how to do specifically Silverlight VB.NET and MySQL and learn to do it the best way as explained above. Everything I've found (books and websites) seems to be in C#, not a Silverlight product, or just uses built in SQL Server support. For our web app, we need to be able to give the buyer not just access to our client side application via a browser but also the server side so they can OPTIONALLY host the entire product themselves. We're hoping to have one installer for them on their server (so they wouldn't have to set up php or mysql to host the product for example). If I use a VB.NET website and web service, will that deploy as just an exe or dll so the user won't have to install anything special?

View 1 Replies

When A Player Types North In Room "Crash Site" They Get The Description Of Traveling To The Next Room "In Trail"?

Jul 27, 2010

I've run into another road block while programming my game. The problem is that when a player types North in room "Crash Site" They get the description of traveling to the next room "In Trail" as well as the description of traveling to the next room after that, "Deeper In Trail" before having to type north again. I've looked over the code several times, but can't find the problem....the conditions seem to be fine, but I'm guessing that's where the problem is..

Code:
ElseIf LCase$(txtInput.Text) = "go north" And Room = "Crash Site" Then
Room = "In Trail"

[code].....

View 14 Replies

Button Click Event Is Raised Twice In Silverlight Project?

Feb 28, 2010

I have a central page loading child controls into a container in a Silverlight Project.Problem is events like button click events are fired twice after processing the child forms.Suspect it might have something to do with a double initializecomponent??

Private Sub btVolgende_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles btVolgende.Click
Select Case Stadium

[code].....

View 2 Replies

VS 2008 - How To Add Custom TabControl To Project

Aug 5, 2010

I'm just not able to add a custom TabControl to my project. I have found a custom tabControl here: [URL]. The CustomTab consists out of 4 .vb files. Normally I would add a component (.dll or exe) to my project. I tried adding the 4 .vb files but unfortunately no CustomTabControl.

View 3 Replies

Silverlight 3 Banner Project - Trigger The Banner To Load New Info Every 5 Seconds

Apr 17, 2010

I have created a banner for a sl3 app . What I need now is a timer(timespan?) event to trigger the banner to load new info every 5 seconds. I can't find info on timespan on how to trigger this event.

View 10 Replies

Port WinForms To Silverlight 2 Or Silverlight 3

Mar 19, 2009

I have a LOB app written in VB.NET with a WinForms front-end and SQL back-end. After many months weighing up how to get onto the Web, I decided last month to use Silverlight 2. Now, Silverlight 3 Beta is out, but there is no end-user runtime.

Does anyone know when the runtime will be available for deployment of SL 3 apps onto client sites?
My dev timeline is about 3 months: should I persist with SL 2 and then u/g to SL3, or jump straight in to SL3?

View 5 Replies

Doing Objects In VB 2005 Project?

Apr 4, 2010

I am hoping that someone from the forum is familiar with the Doing Objects in Visual Basic 2005 book so that this question makes a little more sense. I have completed the sample project and understand most of what I have done. There are some holes in my knowledge but I am sure I will pick up those pieces as I become more familiar with object orientated programming.

The sample project is an almost complete application where you view and edit Objects that are stored in a database. The author leaves the remaining features needed up to the reader, which is great because I have been able to put new knowledge into use. However I am having trouble saving a new object back to the database.

[Code]...

By looking at this code it appears that I can save the data that is in the bindingsource by changing the EntityState to the Enum added. However I am not sure where to set it. I am pretty confident that I have the rest of this correct because when I try to do the save I get an error that the stored procedure is expecting the GoalID.

View 5 Replies

Doing Objects With Visual Basic 2005 Sample Project?

Apr 7, 2010

I am hoping that somebody here is familiar with the book, "Doing Objects with Visual Basic 2005" so this question makes more sense but I will try and ask it in a way that makes knowledge of the book irrelevant.The book contains a sample project that I am trying to use as a "framework" for all my new projects. The project shows you how to read and edit objects to and from a database and that part works great. The author then leaves the new and deletes up to the reader to do, which is a good way to learn. However I am having trouble with the it. My problem is that I am having trouble implementing my own ProcessNew InterfaceI think this is how it should be:

Public Function ProcessNew() As Boolean Implements IMDIChild.ProcessNew
Dim myGoal As Goal = TryCast(GoalBindingSource.AddNew, Goal)
myGoal.Goal = rtxtGoals.Text

[code].....

View 8 Replies

.net - Can The Select Extension Method Project To A List Of Instantiated Objects

Mar 24, 2011

I have two lists declared as follows:

Dim lstDBItems As New List(Of DBItem)
Dim lstAppItems As New List(Of AppItem)

I am trying to do something like this:

I've a function which returns List(Of AppItem):

Function GetAppItems() As List(Of AppItem)
'...
End Function

In the above function I populate lstDBItems and then write the return statement like follows:

Return lstDBItems.Select(Function(x)
dim oItem As New AppItem()
oItem.Property1 = x.DbProperty1

[Code]....

The weird thing is the code compiles, but on rumtime I get a type case error.

View 3 Replies

C# :: WP7 : Can't Get Canvas.RenderTransform Value

Feb 6, 2012

I have about 3-4 canvas controls and each contains about 750-1200 paths.Users needs to make some transform to them and I use for that a global

Canvas SelectedCanvas;
Initially (in the constructor) SelectedCanvas takes the value of one my canvas controls.
SelectedCanvas = canvas1;

[code].....

View 1 Replies

Wpf :: Exporting Canvas To Xps Vb?

Apr 26, 2012

I tried to export my canvas to a file. First I tried to export it to a png and it worked fine, everything looks the same as on the canvas.After that I modified my code to export to a xps file.

Dim thePack As IO.Packaging.Package = IO.Packaging.Package.Open(path.LocalPath,IO.FileMode.Create)
Dim doc As New Xps.Packaging.XpsDocument(thePack)

[code]....

View 1 Replies

C# - Canvas With Ruler Control In .NET?

Mar 2, 2012

Is there a control or something similar to a canvas with a margin(ruler), like in MS Word,in .NET WPF or WinForms?

I need to place some custom elements inside that user can modify in that canvas.

View 2 Replies

C# - Move A Rectangle Around A Canvas?

Sep 4, 2010

I have a canvas in the middle of my application with controls around it. I have a socket that recieves Points and saves them in a list.

I draw small 4x4 rectangles on the canvas for the number of points in my list.. say theres 4 points.. theres 4 rectangles.

I want to be able to move the rectangles when the points change with code.
is this possible without storyboards or any 'animation' class?

I have tried:

'cMap.Children.Remove(r)
'Dim nr As Rectangle = New Rectangle() With {.Width = 4, .Height = 4, .Name = "r" & P.Name, .Fill = Brushes.Red}

[Code].....

View 2 Replies

Cannot Find The Canvas Control In .NET

Jun 2, 2011

I am trying to convert some old VB6 code to VB.NET. The VB6 uses a Canvas control, simply

Dim cv as Canvas

I cannot for the life of me figure out how to use the Canvas control in VB.NET (using VS2005). MSDN says it is in the System.Windows.Controls namespace, which doesn't seem to exist? All I see is System.Windows.Forms, which doesn't include the Canvas control.

View 2 Replies

VS 2010 Drawing On A Canvas With Wpf?

Jun 30, 2010

Finally took the plunge for wpf, all was going well until i needed to do a simple drawing on a canvas control (presume this is the right surface to use). First thing i noticed is that there is no paint event in wpf so i looked at a few others (Initialized, layout updated) at this point i looked under google and found very little on this. would anyone here have or know of a tutorial to allow this functionality? My application (a testbed) will draw an archery target within the canvas along with score numbers in the correct place as follows to do this it will need to draw several filled circles with black (or white) borders and text objects in the correct position. the locations and widths of the circles will be determined using a simple algorithm so my question is on the structure of paint events within wpf, are the commands the same as in gdi+?

View 3 Replies

FTP Or Other File Hosting

Dec 16, 2009

I posted a while ago asking how to manage correlative updates: url...I made that post under the assumption that the direct link i had in place (an attachment on a google site) would not change. Unfortunately I overlooked the fact that google sites use redirect links, just a hair short of direct links. I've heard of FTP Protocols and noticed threads in the c# sections on how to code them, but I don't know much about them. I really need an internet access link for my pgroam to download the file from and am not sure on what the best approach is to this problem. Please advise...I seek not answers, but understanding, that I may not solve, but learn.

View 2 Replies

Drawing Multiple Lines On A Canvas?

Jun 29, 2012

So I built myself a simple program to work out the kinks of drawing in my programs. I have a button that I press that when the textbox.text reads 1 it then draws a line of a specific height, color and position, the problem is when I click that button again it will crash informing me that...
"Specified Visual is already a child of another Visual or the root of a CompositionTarget."
[code..]

I know where the problem lies, its with the Canvas1.children.add(line), cause its telling me the line variable is already been used or in use on the canvas, I'm just unsure of how to turn that into a solution that will allow me to click the button a hundred times or more without being forced to MANUALLY make a hundred or more individual variables to store the line.

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved