this is my second question regarding more or less the same topic, since I am still struggling with it.
This is the layout I need to build:
Also important:
The header and the footer contain buttons, info but shouldn't be included in the page transitions (eg. shouldn't fade in or fade out).
In the end I just want the controls inside the "Page w/ content" (see picture below) area to be animated (fade in/fade out, etc) between the different pages.
What I got so far:
Header and Footer are user controls;
Page w/ content is a Lockablepivot (with headers hidden), and I use the pivot items to switch between the different content I want.
Problems:
I havent been able to put the Islocked = true working (it always gives me a null ref excep);
A pivot item is not really a page, so If the user for presses the back button it leaves the app (I think I can probably solve this by overriding the back button etc..);
I don't know if its easy or even doable to change the pivot items animations (haven't researched much about this one).
Ok, so my real question:
What other options do I have?
Using a ContentPresenter in the "Page w/ content" area to show me another xaml page? I read something about this being not good at all;
Do everything in one page but dynamically and through the code add, delete, fade in, fade out all the controls ?
Any ideas? What about performance? Which one should perform best?
Thank you!
Put an Header and Footer controls to a each page and make any animations with Content control you like
Related
I need some suggestions on what I can use for a text pop up that appears when mouse is hovered over certain text.
I have researched many webpages but nothing that I am looking for to be more specific,
I have a table with headers at the top.
I want people to hover over the heading and get a pop up with the definition of the header.
I have currently something working and its kind of simple.
What I was also wondering if there was a way to have the definitions read from a different place?
The definitions will be read from different pages, if I keep it the way that appears now I will have to change the definitions in many pages instead of one centralized place.
Not sure if this makes sense.
It's called a tooltip. One of my favorites is the one in the Jquery ui toolkit.
http://jqueryui.com/tooltip/
Best regards.
The simplest way is to use default HTML tooltips (title property of the div markup)
<div title="My tooltip text">Header</div>
I am working on an MVC2 project, on a view we display a large data set which refreshes every minute with latest data..some specific records are updated every minute in this data set. I want the browser to focus on these specific records..Not sure how to use javascript focus() here dynamically...
any clue?
thanks,
You need to provide more detail as to exactly what you are attempting to do.
If you are attempting to focus just ensure each record has a unique identifier then you can focus on individual records.
Alternatively you could simply keep the focus at the top or bottom of wherever you are displaying them.
EDIT:
In that case I would suggest something like the following
var currEle = document.getElementById("Record123");
currEle.focus();
Suppose you know how to issue an Ajax call and return either partial view or JSON data and how to use that data on the client afterwards...
You can only focus to a point in the document when
there's only one change or
all changes are summarised together in the same document area
We're also not talking about focusing as in document perspective, but rather about focusing of users attention to document specific content (or part of it).
First option
You can always use something like jQuery.scrollintoview() plugin (link to blog post that describes the plugin here) that will scroll document to the record that changed and highlight it using jQuery UI effect highlight. Linked blog post also describes the purpose of visual animated scrolling instead of simple jumping within the document.
Second option
Put changes at the top and keep your document scrolled at the top when content gets updated. You can blink a few times some icon informing the user of the changed content in the changes area.
Suppose I have an ajax TabContainer with two tabs. Due to certain buisness logic, we might set one of the tabs to Visible = false.
In this scenario, is it possible to hide the TabStrip at the top, so that they don't see only one tab?
OK; didn't get any replies, but just wanted to summarize what I was able to do:
For the above situation, I actually was able to move the contents of the one visible tab outside the container by reassigning its parent control, and then re-adding where it needed to go (my example is a little more complicated than usual, due to update panels being in the section of code getting moved)
However, it does seem possible to hide the TabStrip by modifying its CSS class depending on how many tabs should be displayed. See http://www.krissteele.net/blogdetails.aspx?id=117 or http://cushen.wordpress.com/2007/10/25/how-to-styling-the-asp-net-ajax-tabcontainer-control/ for some examples of how to modify the styling.
Does anyone have any ideas how to create a function that resizes text on a page dynamically without the use of JavaScript? I'm using CMS based on C#?
Is it possible with CSS only? if it's not possible then i want to do with javascript like this page http://demo.joomla.org/1.5/?template=beez and as a fallback want to user server side solution which this page hasn't http://demo.joomla.org/1.5/?template=beez
Without javascript? Well, guess you will have to perform a postback onchange, then perform resize in your codebeind. Not very user friendly though.
I doubt CSS can do that.
You could create 3 links:
A A A
Then on postback, use the value of the 'size' query string attribute as a CSS font-size value. something like (pseudocode)
// aspx
<div style="font-size:<%= getsize(); %>"> ...
// code behind
getsize(){
return Request.QueryString["size"];
}
If you are getting size from database then you can do one thing:
Create a panel and put all controls in it and set size dynamically.
See following for more details:
http://asp-net-example.blogspot.com/2009/04/how-to-set-change-panel-font-size.html
I think you are misunderstanding something, you want a C# function for something that is fundamentally client side? Do you want to do it after the page has loaded or before? You can resize text on a page with CSS easily.
body{ font-size:60%; }
If you are looking for say 3 sizes (standard, large, huge) then the way I've done this is to create the visual elements as ImageButtons or CSS'ed Buttons to style them to fit the design.
You can then hold the body{font-size:1em;} outside of the CSS includes (but before it in the head section) within a Literal to honor the browser defaults by default. When the postback occurs you can adjust the literal accordingly - e.g. large would be adjusted to body{font-size:1.5em}.
litFontSize.Text = "body{font-size:1.5em;}"
You do need to check that the body font-size is being inhereted throughout though, cross browser - form text for one will need independent definiton in my experience.
What do you want to trigger the dynamic-resizing? The window being resized? Or the user pressing a button?
If you want to resize text when a user resizes the window, then no - you won't be able to do that with CSS alone, since CSS doesn't have any way of setting font sizes based on the window size. Every site I've seen that does this does it via javascript.
If you want the trigger to be a button press, then this is pretty simple - the button sends a postback to the server, you pick up their desired size from a dropdown or from the specific button that was pressed, and then you can add some CSS into the page or add a link to a different stylesheet.
I have a web application(ASP.NET2.0 C#) and in it, I have a gridview that gets its data from a datasource.
I wanted to add the following feature: the user can click a button "select columns", and a box pops up with a list of all the columns(a checkboxlist in a div, possibly) and that way, the user can choose the columns they want to see, and click another button "show" and the list of columns goes away, and the table shows the columns that the user selected.
I have already implemented the column choosing part, but it is the popup part that I need help with. How can I make the div popup and then disappear?
The solution might require javascript, and I might not have figured it out since I don't really know javascript that well.
Thank you.
HI,
Its better to make the display of div to be none rather than setting visibility to hidden. If visibility is set to hidden even if the div doesn't show up but it will take the rendering space which in some situation might not be that good.
You can dynamically create a div using createNode and then by absolute positioning and setting the top and left according to your convenience you can align the div to any portion in the page. Its better if you could disable the background when the div pops out.
Create the div and set visible=false. When you want to pop it up write the javascript to set it visible=true.
here's a good pointer http://lists.evolt.org/archive/Week-of-Mon-20020624/116151.html