I need to insert into a border text with bullets (look at the next picture for example):
Is there any special property for this or should I use some container like grid and get this manually?
If your solution rely on Expression Blend it fine by me (I`m using Blend 4).
Thanks
Ofir
Related
Expression design has a feature called Skeleton strokes which allows you to use arbitrary vector/bitmap as a stroke.
http://msdn.microsoft.com/en-us/library/cc294949(v=expression.30).aspx
http://msdn.microsoft.com/en-us/library/cc294775(v=expression.30).aspx
The stroke is treated as a skeleton and the brush is painted following the stroke. Using an ImageBrush in silverlight doesn't seem to have the same effect. Rather it just renders the ImageBrush as if it would render the fill but with the fill portion cut out.
BTW, I'm using Silverlight 5
Silverlight doesn't support this feature. At least not out of the box.
I'm a developer who's trying to get the hang of Blend. I've always used Blend to mess with control templates and such, but I'm trying to get the hang of using it for basic UI design, since I figure it's probably a bit faster than typing the XAML up manually in Visual Studio.
Right now I'm just trying to create a basic Grid, but I'm seeing two default behaviors that I'm hoping someone can show me how to change.
1) When I hover my mouse outside of the design surface, I see the temporary yellow line to show up, where the new Grid Column / Row will be when I click. The problem is that the newly created rows are set to heights like 0.2297* How do I get Blend to attach regular heights, like 250?
2) Ignoring 1), once I have some rows and columns, when I drag a button, or combo box, etc, onto one of the cells, it drops it exactly where I release the mouse, while adding some large margins to position it there. Is it possible to tell blend to just drop the control into the cell, and leave the margins alone?
Grids are awesome but it takes a bit of play to get proficient at working with them in Blend. Here are some tips to get you started (I cover this in detail in chapter 4 of my book).
1) When you use the snap lines to create rows and columns Blend automatically makes them relative (Star) sized, which is the behavior you are seeing. To change the row/column style to fixed (Pixel) sizes, click on the Padlock icons to the left and top of the desired rows and columns. Then, either edit the values in XAML or you can click near (but not on) the padlock to select the row or column. This will open the sizing properties in the Properties panel.
2) The short answer is "No". Blend will always add Margins when you draw the element in a cell unless you take care to draw them to the borders. This is too difficult and time consuming, so I just make sure I draw it somewhere inside my target cell. Now I can right-click the element and select "Auto Size > Fill" and the element will fill up the cell: no Margins, Width and Height set to Auto, and Horizontal and Vertical Alignments set to Stretch. [FWIW, addressing this is my number one feature request for Blend.]
I hope this helps.
To answer point 1) Blend is creating proportional grids so that the columns remain the same relative widths when you grow or shrink the grid rather than absolute grids. So if you want absolute grid widths you'll have to go in and edit the values by hand.
I find that it's easier to create the basic form in Blend and then tweak the values in the text editor - either in Visual Studio or Blend itself.
As for point 2) I've just tried this and as long as I click inside the column/row on the grid when placing a button it adds it to the correct column/row of the grid as expected. Select the button and then just double click inside the grid - this should add a button of default size where you clicked, but in the grid. (It would be much easier if I could see what you were doing).
TextBox seems to work differently from others...
Say you want a different font, rounded corners, different colors, a tiled image for the background, reduced padding above/below the text (when I change the font on an individual TextBox they get a little too tall but there's a lot of wasted space), etc. How do you do this in Blend 4?
I'd like it to be in App.xaml so that it's used by default for all TextBox controls in the app.
I think everything you mentioned can be done using controltemplates.What is not working ?
Check this link
http://msdn.microsoft.com/en-us/library/ms752068%28v=vs.85%29.aspx
It will get you started for sure
I got a canvas which has many uiElements as its children.
When i get the xaml and paste it in Expression blend it displays it well.
Now when i select a path in blend and resize it by dragging the height of it grows successfully increasing the width and the rest of the coordinates are automatically calculated.
I need to give this kind of functionality to my users for the elements on my canvas.
Just wondering if any one has any suggestions or links which can help me.
Thanks
N
You want to look at the Adorner Framework of WPF. That article gives an overview and is a good place to get started.
Here is an Adorner sample that probably does what you want.
Anyone have any suggestions on how to insert a row or column in a WPF Grid using (preferably) Visual Studio 2008?
It's no problem to add a new RowDefinition or ColumnDefinition, but I'm really not too excited about the prospect of incrementing the Grid.Row or Grid.Column for the large number of cells that are affected by the insertion. Has anyone come up with a clever way to automate this (perhaps with a regular expression find/replace operation)?
If this can't be done in Studio, can it be done in Blend?
Use smaller size grids in your applications and then put those grids inside other grids, or try some of the WPF grid tools by Karl on WPF
VS2010 looks like it will have a better editor.
Blend is fairly good at inserting rows - when in design edit mode you can click the edge to add a row; Blend will then adjust your layout to look the same with the edited row. You will still need to manually move elements around the grid, but it should be less work overall.
I had the same problem, and used vim to increment the row numbers. This was my expression:
:.,$s/\(Grid.Row="\)\(\d\+\)/\=join([submatch(1),submatch(2)+1],'')/
Explanation:
:.,$s substitute (:s) from the current line (.) until the end of the file ($)
/\(Grid.Row="\)\(\d\+\)/ searches for Grid.Row=" followed by a 1 or more digit number (\d\+). Both parts are between \( and \) to use the submatch function.
\=join([... ],'') joins the strings in the array between [ and ].
submatch(1), the first submatch, ie the text Grid.Row="/
submatch(2)+1, the second submatch, ie the number incremented with 1.