text stringlengths 1 22.8M |
|---|
Alexis Laurent Patrice Roge Flips (born 18 January 2000) is a French professional footballer who plays as a winger for R.S.C. Anderlecht.
Club career
A youth product of Lille OSC, Flips was loaned to AC Ajaccio on 19 August 2019. He made his professional debut with Ajaccio in a 1–0 Ligue 2 win over Paris FC on 23 August 2019. On 5 October 2020, he transferred to Stade de Reims.
On August 8, 2023, Flips joined R.S.C. Anderlecht on a 5 year deal.
International career
Flips is a youth international for France. He represented the France U17s at the 2017 FIFA U-17 World Cup.
References
External links
2000 births
Living people
People from Villeneuve-d'Ascq
Footballers from Nord (French department)
French men's footballers
Men's association football wingers
France men's youth international footballers
Ligue 1 players
Ligue 2 players
Championnat National 2 players
Championnat National 3 players
Lille OSC players
AC Ajaccio players
Stade de Reims players |
John Németh (born March 10, 1975) is an American electric blues and soul harmonicist, singer, and songwriter. He has received five Blues Music Awards for Soul Blues Male Artist, Soul Blues Album, Traditional Blues Album of the Year, Instrumentalist - Vocals and Instrumentalist - Harmonica. He has recorded ten albums since 2002, having also backed Junior Watson, Anson Funderburgh and Elvin Bishop. He has opened for Robert Cray, Keb' Mo', and Earl Thomas.
AllMusic noted that he is a "vocalist with great range, ability, and soulfulness, Németh had also developed into a top-notch blues harmonica player..." In 2013 alone, he was nominated five times for a Blues Music Award, making nine such nominations in total.
Early life and education
Németh was born in Boise, Idaho, United States. After singing at his local church, Németh played in local groups in his teenage years, and later formed Fat John & the 3 Slims with his friend Tom Moore. He toured and performed regularly working between five and seven nights a week for almost a decade.
Career
By 2000, Németh was supplying backing to Junior Watson, and separately fronting his own band known as The Jacks. In 2002, he self-published the album, The Jack of Harps. His debut solo effort, Come and Get It, followed in 2004. The same year, Németh relocated to Oakland, California. Gaining more experience, he temporarily replaced Sam Myers in Anson Funderburgh's backing band in 2005 and 2006.
In 2006, he signed a recording contract with Blind Pig Records. Magic Touch, which was produced by Funderburgh and had Watson as a guest musician on several tracks, was issued in 2007. Living Blues stated "Magic Touch gives hope that the blues will survive." The release saw Németh nominated for a Blues Music Award in the 'Best New Artist Debut' category. Németh also appeared on Elvin Bishop's The Blues Roles On album (2008), which was nominated for a Grammy Award in the Best Traditional Blues Album category. Németh performed at the Blue Bear Live III concert on May 9, 2008 at the Great American Music Hall, to benefit the Blue Bear School of Music. Németh's next release, Love Me Tonight (2009), reached number 6 in the Billboard Top Blues Albums Chart.
Németh's fourth solo release, Name the Day!, was released in 2010. It equalled the achievement of Love Me Tonight by peaking at number 6 in the Billboard Top Blues Albums Chart. Blues Live was recorded in February 2012 at three venues in the San Francisco Bay Area, and included guitar contributions from Kid Andersen. Soul Live was released in September 2012. In 2020, Németh signed with Nola Blue Records. His album, Stronger Than Strong, was released on October 16, 2020.
Accolades
In 2013, Németh was nominated in five categories for a Blues Music Award. These included 'B.B. King Entertainer', 'Contemporary Blues Album', 'Instrumentalist - Harmonica', 'Soul Blues Album', and 'Soul Blues Male Artist'. Németh performed at the Great Lakes Blues Society in April; the Simi Valley Cajun & Blues Music Festival in May; and the Jackson Rhythm and Blues Festival in August 2013. He relocated to Memphis, Tennessee in early 2013, and has stated that the Bo-Keys will back him on his next recording. In 2014, he won a Blues Music Award in the 'Soul Blues Male Artist of the Year' category. He was nominated again in the 'B.B. King Entertainer' category for the 42nd Blues Music Awards, scheduled to take place on June 6, 2021. In 2023, Nemeth won the 'Instrumentalist - Harmonica' category at the Blues Music Awards, alongside May Be the Last Time being named the 'Traditional Blues Album of the Year'.
Discography
See also
List of electric blues musicians
List of harmonica blues musicians
List of blue-eyed soul artists
List of harmonicists
References
External links
Official website
1975 births
Living people
American blues singers
American blues harmonica players
American people of Hungarian descent
Harmonica blues musicians
Electric blues musicians
Songwriters from Idaho
Musicians from Boise, Idaho
Musicians from Oakland, California
Singers from California
Songwriters from California
21st-century American singers
21st-century American male singers
Blind Pig Records artists
American male songwriters |
Quetcy Lozada is an American politician who represents the 7th Councilmanic District on the Philadelphia City Council since 2022.
Career
Lozada served as the Chief of Staff to Maria Quiñones-Sánchez. When Quinones-Sanchez resigned to run for Mayor, Lozada was nominated by the Ward Leaders in the 7th District over Angel Cruz for the special election nomination. She won the general election on November 8, 2022. She will represent Kensington, Feltonville, Juniata Park, and Frankford on the council.
References
1970 births
Living people
Philadelphia City Council members
Pennsylvania Democrats |
Pinagbayanan is a barrio in the municipality of Pila, Laguna, Philippines. The 2010 census estimates its population at 5,305 people. Archaeological excavations in the area have contributed to developments in the field of ceramics and led to the recognition of the importance of the area to archaeology.
Background
Archaeological excavations in the area have contributed to the developments in the field of ceramics and led to the recognition of the importance of the Laguna de Bay area to archaeology. H. Otley Beyer had pointed out the archaeological potential of the areas around Laguna de Bay due to its strategic location. It was among the most important centers of trade and culture during the period in the history of the Philippines that Beyer called the Porcelain Age, during which trade with China—under the Sung and Yuan dynasties—flourished, as evidenced by trade ceramics dated from the same period.
Excavations
Despite the number of porcelain sites in the area, only a few had been systematically excavated until the 1960s. In 1967, archaeological excavations were conducted by Julita Fernandez, Amelia Rogel, Dr. Robert Bradford Fox and Avelino Legaspi around the Laguna de Bay area. 153 graves were found, dated from 12th to 15th CE.
Locsin Excavations
Leandro and Cecilia Locsin and a team of archaeologists from the University of San Carlos, headed by Rosa C.P. Tenazas, partially excavated three sites in Pinagbayanan from 1967 to 1968. A typhoon helped in recovering additional information by uncovering burial locations. The dearth of skeletal remains made the identification of burials difficult. Of the 190 burials discovered, only 20 contained traces of skeletal remains. With the exception of one Ming burial which was the most well-preserved and contained ten pieces of pottery, none of the other burials were associated with grave goods.
Discoveries
The discoveries in the Locsin and the University of San Carlos excavation of Pinagbayanan are divided into several archaeological horizons dated from 1100 AD to 1400 AD. The first horizon is associated with the Iron Age, before trade contacts were established with China or Arabia and contained earthenware used for burials. The second horizon is associated with the Sung period. The depth of the stratigraphic layer indicates long periods without cultural change. The site was mainly used for burials. The third horizon is associated with the Yuan period. The presence of horse bones shows that horses had come earlier than the Spaniards. The sites were used for habitation and burials. A crematory complex was also discovered. The stone structure contained phosphate deposits, bamboo charcoal and other evidence of burning.
Phallic earthenwares were found in the Pinagbayanan sites which suggest the possibility that they were used as a symbol of fertility. A net sinker that might have been intended to be a yonic symbol was also discovered.
References
Tenazas, R.C.P. A report on the archeology of the Locsin-University of San Carlos Excavations in Pila, Laguna.
Vitales, T.J. Archaeological research in the Laguna de Bay area, Philippines. Last accessed 2015-05-18
Valdes, C.O. Pila in Ancient Times. Last accessed 2015-05-18
Pinagbayanan
Archaeology of the Philippines |
War (, translit. Voina) is a 2002 Russian war film by Aleksei Balabanov about the realities of the Second Chechen War, starring Aleksei Chadov and Ian Kelly.
Plot
The film begins with the protagonist, former conscript Ivan Yermakov (Alexei Chadov), being interviewed by a journalist in a detention center. As he begins recounting his story, the film cuts to Chechnya in the summer of 2001, during the Second Chechen War. Held captive by Chechen warlord Aslan Gugayev (Georgy Gurguliya), Ivan and another conscript, Fedya, serve as domestic slaves, while Aslan also uses Ivan as a communications specialist. Eventually, Aslan's militants also capture English actor John Boyle (Ian Kelly) and his fiancée Margaret Michaelsen (Ingeborga Dapkūnaitė). After a while, Ivan, Fedya, and the two English prisoners are taken to another aul and put into a zindan where they find Captain Medvedev (Sergei Bodrov, Jr.), who is paralyzed due to injury.
Aslan releases John so that he can raise £2 million ransom for Margaret's release. Along with John, he releases Ivan and Fedya, as no-one is willing to pay for them.
John's efforts to raise money are unsuccessful, but one British television company offered to provide him with financial assistance in exchange for extensive video footage of the operation. In Moscow, John again runs into the complete indifference of military officials and instead decides to ask Ivan to help him rescue Margaret.
Ivan's life in Tobolsk is not working out. He cannot adapt to a peaceful civilian life, and he cannot find work due to fears over his potentially unbalanced psyche after Chechen captivity. Before that, he comes to St. Petersburg, to the family of Captain Medvedev, whom no one is willing to rescue. When John comes to Tobolsk, Ivan agrees to go back to Chechnya in exchange for money. After passing through Moscow and Vladikavkaz, Ivan and John covertly enter Chechnya, seizing an SUV with a large number of weapons in the trunk en route. On their way, they kidnap a local, Ruslan Shamayev (Euclid Kyurdzidis), and Ivan finds the road to Gugayev's aul. After waiting for a large group of militants to depart, Ivan, John, and Ruslan attack the aul. Having killed the guards with the weapons they had seized earlier, they find Margaret with Captain Medvedev and discover that the militants had raped her. Enraged, John kills Gugayev, further complicating the situation: Ivan needed Gugayev alive as a hostage to leave Chechnya safely.
Gugayev's militants assault the aul and give chase, but the group escapes on a makeshift raft and takes up defensive positions in an old fortress tower. With the help of a satellite phone taken from Aslan, Medvedev requests support from the Air Force. Russian Mi-24 helicopters arrive, routing the militants, and deliver Medvedev and the group to a military base.
John gives Ivan the cash he promised, of which he shares a thousand pounds with Ruslan. Ivan later gives the remaining money gave to Captain Medvedev for treatment.
The film ends with Ivan's brief comments. Margaret did not marry John. John, having filmed the trip, released a movie and a book, titled "My Life in Russia." After the release of his film, Ivan was brought to trial for "the murder of peaceful citizens of the Russian Federation." Ruslan, who moved to Moscow, testified against Ivan. The only one who stood up for Ivan was Captain Medvedev.
Cast
Film crew
Production
Aleksei Balabanov wrote the scenario for the film in 1998 after he saw on television the severed heads of British specialists working in Chechnya.
Balabanov aspired to make the film incredibly realistic, to the point of naturalism. Before shooting, he interviewed former captives from the First Chechen War, traveled to the villages of Kabardino-Balkaria, met with General Viktor Kazantsev, the commander of the Russian troops in Chechnya, and watched videotapes chronicling Chechen atrocities. Some of these tapes he demonstrated to the English actor Ian Kelly. According to Balabanov, during the showing Kelly was shaking.
The film was shot in Kabardino-Balkaria, North Ossetia, Chechnya, Moscow, St. Petersburg, Tobolsk, and London.
For greater realism, real Chechens played most of the Chechens, and Russian soldiers played most of the troops in the film. Due to the war, the film was only partially filmed on Chechen lands, in particular at the checkpoint at the entrance to Grozny. The film was shot in near-warlike conditions. The shooting took place in quiet areas, and SOBR officers guarded the crew.
When shooting the scenes with the captives in the zindan, the crew dug out a real pit. The actors laid in the wet, filthy hole for several hours, as Balabanov wanted everything to be as realistic as possible. The scene with actress Ingeborga Dapkūnaitė floating naked in a cold rapid was filmed without using a double.
More than anyone, the filming most intimidated the English actor Ian Kelly, who did not understand the Russian language.
During the filming in Kabardino-Balkaria, a helicopter used for the film produced thermal shots, and one of them accidentally got into an ancient Balkar cemetery, as a result of which it caught fire and destroyed many of the graves. The incident almost caused a conflict between the film crew and the residents. Among the SOBR officers guarding the group was a former Chechen captain, who was able to stop the infuriated crowd. On the set, all but Bodrov and Dapkūnaitė lived in the homes of the residents. Balabanov lived in the house of a woman whose ancestors' tombs were destroyed in the incident.
Music
{{track listing
|headline = Tracklist :
|extra_column = Performer
|title1 = Voina (Война, War)
|extra1 = Timur Mutsurayev
|length1 = 0:52
|title2 = Komandor (Командор, Commander)
|extra2 = Tomas
|length2 = 5:14
|title3 = Volki (Волки, Wolves)
|extra3 = Bi-2
|length3 = 5:37
|title4 = SOS
|extra4 = Splean
|length4 = 4:30
|title5 = Bereg (Берег, Coast)
|extra5 = Vyacheslav Butusov
|length5 = 4:43
|title6 = Lyutaya(Лютая, Fierce)
|extra6 = Volga-Volga
|length6 = 1:36
|title7 = Chyorny voron (Чёрный ворон, Black Raven)
|extra7 = Livan and PEKh
|length7 = 5:53
|title8 = Fellini (Феллини)
|extra8 = Splean/Bi-2
|length8 = 5:05
|title9 = Yeshyo ne vecher (Ещё не вечер, Not yet evening)
|extra9 = Bi-2
|length9 = 4:55
|title10 = ''Plastmassovaya Zhizn (Пластмассовая Жизнь, Plastic Life)
|extra10 = Splean
|length10 = 3:31
|title11 = Sokol (Сокол, Falcon)
|extra11 = Bi-2
|length11 = 7:07
|title12 = Kholostye puli (Холостые пули, Blank bullets)
|extra12 = Partisan radio
|length12 = 4:11
|title13 = Moya zvezda (Моя звезда, My star)
|extra13 = Vyacheslav Butusov and Deadushki
|length13 = 5:14
|title14 = Vulitsa (Вулиця, Street)
|extra14 = Okean Elzy
|length14 = 5:28
|title15 = Voina (Volki-2) (Война (Волки-2), War (Wolves-2))
|extra15 = Bi-2
|length15 = 4:33
}}Music that was featured in the film, but not included in the soundtrack:'''
Awards and nominations
2002 - According to leading wholesale companies, the film took fourth place among the 50 best-selling video films in 2002, ahead of a large number of high-budget blockbusters.
2002, June - XIII Open Russian Film Festival "Kinotavr" in Sochi, the film participated in the contest, winning the Grand Prize.
2002, August - Yalta Film Festival, Grand Prize.
2002, August - X "Window to Europe" Film Festival in Vyborg, 3rd place in the "Vyborg Account" nomination.
2002, October - Montreal World Film Festival, Canada, "Best Actor" (Aleksey Chadov).
2002, December - Golden Aries Award of the National Guild of Film Critics and Cinematography in the nomination "Best Cinematography" (Sergei Astakhov).
2003, February - Golden Eagle Award in the nomination "Best Sound" (Maxim Belovolov).
2003, April - Nika Award in the nomination "Best Actor" (Sergei Bodrov Jr., posthumously).
Similar films
Prisoner of the Mountains
References
External links
2002 films
Russian action war films
Russian war drama films
Chechen wars films
2000s Russian-language films
2000s English-language films
Chechen-language films
Films about terrorism in Europe
2000s action war films
Films about war correspondents
Films directed by Aleksei Balabanov
Films set in Moscow
Films set in Saint Petersburg
Films set in Siberia
Films set in 2001
Films shot in Moscow
Films shot in the North Caucasus
Films shot in Saint Petersburg
Films shot in Siberia
Military of Russia in films
Prisoner of war films |
Twinette L. Johnson is an American law professor and academic administrator serving as the dean of the David A. Clarke School of Law since 2023.
Life
Johnson earned a B.A. in English literature (1996) and Ph.D. in public policy (2019) from Saint Louis University. She earned a J.D. from the Tulane University Law School in 1999. She clerked for Missouri Supreme Court judge Duane Benton. Her dissertation was titled Winds of Change, Windows of Opportunity, and Promises of Choice: A Study of New Orleans Post-Hurricane Katrina Charter School Reform and its Effect on Post-Secondary Matriculation Among Orleans Parish Residents.
Johnson was an associate attorney with Shearman & Sterling where represented financial institutions and corporations. She served as an associate professor of legal writing at the Saint Louis University School of Law for eight years. From August 2011 to July 2017, Johnson was an associate professor of law and director of the academic success program at Southern Illinois University School of Law. Johnson joined the David A. Clarke School of Law in 2017 as a professor of law and director of the academic success program. She was selected as the acting dean on August 1, 2022, succeeding Renée M. Hutchins. On July 3, 2023, she formally assumed the role.
Selected works
References
Living people
Year of birth missing (living people)
Place of birth missing (living people)
Saint Louis University alumni
Tulane University Law School alumni
Saint Louis University School of Law faculty
Southern Illinois University faculty
David A. Clarke School of Law faculty
Deans of law schools in the United States
African-American women academic administrators
African-American legal scholars
American women legal scholars
21st-century American women academics
21st-century African-American women
21st-century African-American lawyers
21st-century American women lawyers |
"The Yankee Doodle Boy", also known as "(I'm a) Yankee Doodle Dandy" is a patriotic song from the Broadway musical Little Johnny Jones, written by George M. Cohan. The play opened at the Liberty Theater on November 7, 1904. The play concerns the trials and tribulations of a fictional American jockey, Johnny Jones (based on the real-life jockey Tod Sloan), who rides a horse named Yankee Doodle in the English Derby. Cohan incorporates snippets of several popular traditional American songs into his lyrics of this song, as he often did with his songs. The song was performed by James Cagney in the 1942 film Yankee Doodle Dandy, in which he played Cohan.
Modern performances and covers
In 2004, the American Film Institute placed the song at No. 71 on its AFI's 100 Years...100 Songs. A version of the song was recorded by Cohan's contemporary and fellow Irish-American Billy Murray, who sang it as indicated in the lyrics. Also, a shortened lyric disco version of the song was sung by Paul Jabara on the 1977 album Shut Out and the 1983 album Greatest Hits and Misses on Casablanca Records.
Lyrics
Verse 1
I'm the kid that's all the candy, 1
I'm a Yankee Doodle Dandy,
I'm glad I am,
So's Uncle Sam.
I'm a real live Yankee Doodle,
Made my name and fame and boodle,
Just like Mister Doodle did, by riding on a pony.
I love to listen to the Dixie strain,
I long to see the girl I left behind me;
That ain't a josh,
She's a Yankee, by gosh.
Oh, say can you see,
Anything about a Yankee that's a phony?
Verse 2
Father's name was Hezikiah,
Mother's name was Ann Maria, 2
Yanks through and through.
Red, White and Blue
Father was so Yankee-hearted,
When the Spanish war was started,
He slipped on a uniform and hopped upon a pony.
My mother's mother was a Yankee true,
My father's father was a Yankee too:
That's going some,
For the Yankees, by gum.
Oh, say can you see
Anything about my pedigree that's phony?
Chorus
I'm a Yankee Doodle Dandy,
A Yankee Doodle, do or die;
A real live nephew of my Uncle Sam,
Born on the Fourth of July.
I've got a Yankee Doodle sweetheart,
She's my Yankee Doodle joy.
Yankee Doodle came to London, just to ride the ponies;
I am the Yankee Doodle Boy.
Footnotes:
1 "All the candy" was late 19th century slang equivalent to "hot stuff".
2 Pronounced the old-fashioned way, "mah-RYE-ah"
References
External links
The Yankee Doodle boy performed by Billy Murray (Cylinder Preservation and Digitization Project)
Billy Murray's disc recording
Library of Congress
American patriotic songs
Songs from Little Johnny Jones
Billy Murray (singer) songs
1904 songs
Songs written by George M. Cohan |
Thumb hypoplasia is a spectrum of congenital abnormalities of the thumb varying from small defects to complete absence of the thumb. It can be isolated, when only the thumb is affected, and in 60% of the cases it is associated with radial dysplasia (or radial club, radius dysplasia, longitudinal radial deficiency). Radial dysplasia is the condition in which the forearm bone and the soft tissues on the thumb side are underdeveloped or absent.
In an embryo the upper extremities develop from week four of the gestation. During the fifth to eighth week the thumb will further develop. In this period something goes wrong with the growth of the thumb but the exact cause of thumb hypoplasia is unknown.
One out of every 100,000 live births shows thumb hypoplasia. In more than 50% of the cases both hands are affected, otherwise mainly the right hand is affected.
About 86% of the children with hypoplastic thumb have associated abnormalities. Embryological hand development occurs simultaneously with growth and development of the cardiovascular, neurologic and hematopoietic systems. Thumb hypoplasia has been described in 30 syndromes wherein those abnormalities have been seen. A syndrome is a combination of three or more abnormalities. Examples of syndromes with an hypoplastic thumb are Holt–Oram syndrome, VACTERL association and thrombocytopenia absent radius (TAR syndrome).
Classification
In general there are five types of thumb hypoplasia, originally described by Muller in 1937 and improved by Blauth, Buck-Gramcko and Manske.
- Type I: the thumb is small, normal components are present but undersized. Two muscles of the thumb, the abductor pollicis brevis and opponens pollicis, are not fully developed
,. This type requires no surgical treatment in most cases.
- Type II is characterized by a tight web space between the thumb and index finger which restricts movement, poor thenar muscles and an unstable middle joint of the thumb metacarpophalangeal joint. This unstable thumb is best treated with reconstruction of the mentioned structures.
- Type III thumbs are subclassified into two subtypes by Manske. Both involve a less developed first metacarpal and a nearly absent thenar musculature. Type III-A has a fairly stable carpometacarpal joint and type III-B does not. The function of the thumb is poor. Children with type III are the most difficult patients to treat because there is not one specific treatment for the hypoplastic thumb. The limit between pollicization and reconstruction varies. Some surgeons have said that type IIIA is amenable to reconstruction and not type IIIB. Others say type IIIA is not suitable for reconstruction too. Based on the diagnosis the doctor has to decide what is needed to be done to obtain a more functional thumb, i.e. reconstruction or pollicization. In this group careful attention should be paid to anomalous tendons coming from the forearm (extrinsic muscles, like an aberrant long thumb flexor – flexor pollicis longus).
- Type IV is called a pouce flottant, floating thumb. This thumb has a neurovascular bundle which connects it to the skin of the hand. There’s no evidence of thenar muscles and rarely functioning tendons. It has a few rudimentary bones. Children with type IV are difficult to reconstruct. This type is nearly always treated with an index finger pollicization to improve hand function.
- Type V is no thumb at all and requires pollicization.
Cause
The cause is unknown, and likely related to genetic abnormalities. Children with Fanconi anemia can sometimes display hypoplasia of the thumb.
Diagnosis
Three main points in diagnosing thumb hypoplasia are: width of the first web space, instability of the involved joints and function of the thumb. Thorough physical examination together with anatomic verification at operation reveals all the anomalies. An X-ray of the hand and thumb in two directions is always mandatory. When the pediatrician thinks the condition is associated with some kind of syndrome other tests will be done. More subtle manifestations of types I and II may not be recognized, especially when more obvious manifestations of longitudinal radial deficiency in the opposite extremity are present. Therefore, a careful examination of both hands is important.
Treatment
When it comes to treatment it is important to differentiate a thumb that needs stability, more web width and function, or a thumb that needs to be replaced by the index finger. Severe thumb hypoplasia is best treated by pollicization of the index finger. Less severe thumb hypoplasia can be reconstructed by first web space release, ligament reconstruction and muscle or tendon transfer.
It has been recommended that pollicization is performed before 12 months, but a long-term study of pollicizations performed between the age of 9 months and 16 years showed no differences in function related to age at operation.
It is important to know that every reconstruction of the thumb never gives a normal thumb, because there is always a decline of function. When a child has a good index finger, wrist and fore-arm the maximum strength of the thumb will be 50% after surgery in comparison with a normal thumb. The less developed the index finger, wrist and fore-arm is, the less strength the reconstructed thumb will have after surgery.
References
Plastic surgery
Congenital disorders
Congenital disorders of musculoskeletal system
Rare diseases
Fingers |
Troubled Laughter is a 1979 Chinese drama film directed by Yang Yanjin and Deng Yimin, set in the Cultural Revolution. The film stars Li Zhiyu as Fu Bin, a powerless newspaper writer who struggles with his conscience during an age of pervasive dishonesty and immorality from the top on down. It was screened out of competition at the 1981 Cannes Film Festival.
Cast
Li Zhiyu as Fu Bin, a writer working for the Haicheng Daily
Pan Hong as Fu Bin's devoted wife, a schoolteacher
Gong Fei as Fu Bin's young daughter
Shi Jiufeng as Fu Bin's colleague and old acquaintance
Cheng Zhi as Haicheng Daily's chief editor, an ass-kisser
Yuan Yue as Song Abao, Haicheng's Communist Party secretary, a scheming lowlife
Bai Mu as disgraced professor of surgery
Qiao Qi as Fu Bin's former professor in journalism
Qin Yi as the wife of Fu Bin's former professor, a former actress
Fu Hengzhi as failing medical student-turned-heartless hospital leader
Qiu Shisui as a sympathizing doctor
Hong Zhaosen as secretary
References
External links
1979 films
1970s Mandarin-language films
1979 drama films
Films about the Cultural Revolution
Films shot in Shanghai
Shanghai Film Studio films
Chinese drama films |
Italian Salvadorans (; ) are Salvadoran-born citizens who are fully or partially of Italian descent, whose ancestors were Italians who emigrated to El Salvador during the Italian diaspora, or Italian-born people in El Salvador.
Italian Salvadorans are one of the largest European communities in El Salvador, and one of the largest in Central America and the Caribbean, as well as one of those with the greatest social and cultural weight of America.
Italians have strongly influenced Salvadoran society and participated in the construction of the country's identity. Italian culture is distinguished by infrastructure, gastronomy, education, dance, and other distinctions, there being several notable Salvadorans of Italian descent.
History
There is evidence of Italians residing in El Salvador since 1850, therefore before the Italian unification, coming from the Kingdom of Sardinia-Piedmont and the Kingdom of the Two Sicilies, for which one distinguished intellectuals, merchants and other Italian lower-middle classes, with the ships that brought them to El Salvador departing from important port cities of Italy, especially Naples, Genoa and Palermo. Most of these Italians entered from the port of La Libertad and the east of the country, and in that period the Italians in the country did not exceed 2,000, however in the following years the number of arrivals would grow. In fact, most of the immigrants came from Italy between 1871 and World War II, after the Italian unification, with the peak occurring between 1880 and 1930.
In 1871, the Salvadoran government implemented reforms and took an interest in the agricultural colonies, and in 1890 the Italians arrived and in 1892 it was estimated that there were more than 600 Italians in the national territory. The Salesians also arrived and founded their first school in Central America, as well as many architects, to build theaters such as the Teatro de Santa Ana. In 1898, the Sociedad de Asistencia y Beneficencia entre Italianos en El Salvador ("Assistance and Charity Society among Italians in El Salvador"), was established with the aim of helping newly arrived Italians find work and help them financially until it was obtained.
The 20th century was characterized by the massive entry of Italians into the country. Between 1900 and 1909, more than 10,000 Italians from all Italian regions, mainly from Campania and Piedmont, arrived in the country. At that time, El Salvador was the second destination by number of choices by Italians expatriating to Central America, many looking for better opportunities for their businesses and improve their quality of life where different traders and Italians who enter the country stand out, many of whom stand out in sectors such as education, music, agriculture, the industry, commerce and infrastructure.
Between 1910 and 1919, thousands more Italians entered the country, registering more than 6,000 arrivals, with the Italian immigrants adapting to the new life, from southern and northern Italy for various reasons, mainly originating from Castelnuovo di Conza, Vercelli, Naples and Turin. During this decade, El Salvador was the main recipient of Italians in Central America, while between 1920 and 1929, several Italian traders and professionals arrived, but also lower-class Italians, many setting up their businesses.
Starting in the 1930s, immigration from Italy began to decrease. In particular, it is estimated that between 1930 and 1939 more than 1,000 Italians arrived in the country and many started their own businesses.
Italian refugees arrived during World War II but to a lesser extent than in previous times. In particular, starting from 1940, due to World War II, a small migratory wave of thousands of Italians emigrated to El Salvador, where several traders and Italians stood out who wanted to improve their quality of life, with this period which was characterized by the entry of several Italian refugees, the majority of whom came from northern Italy. Several Italians from the Campanian town of Laviano also immigrated to El Salvador shortly after the war. Italians easily adapted and assimilated into the country and also began to distinguish themselves, mainly in commerce and industry.
Between 1960 and 1980, several Franciscans arrived in the country, many founded schools and organizations to help the Salvadoran people, but also to reactivate the Italian culture in the country. In the second half of the 20th century, Salvadoran music was enriched by the son of a Neapolitan emigrant, Francisco Palaviccini (1912–1996), who was composer, director, saxophonist, trumpeter and singer of Salvadoran folklore and who was honored in 1992 by the government of El Salvador.
Between 1989 and 1994, the president of El Salvador was Alfredo Cristiani, of Italian origin. After five difficult years, he finished his mandate in 1994 and left his country stabilized by the Salvadoran Civil War that had plagued it for 20 years.
Regions of origin
During the mid-19th century until the mid-20th century, waves of Italian immigrants were registered and arrived from all regions of Italy, mainly from Northern Italy and Southern Italy. The first Italians to arrive in the country were, before the unification of Italy, mainly the Italians from the Kingdom of Piedmont-Sardinia and from the Kingdom of the Two Sicilies, while from 1880, after the unification of Italy, there was a flow from all the Italian regions, mainly from the south of the peninsula, especially from regions such as Campania, Basilicata, Apulia and Sicily, but also from the north of the peninsula such as Piedmont, Liguria and Lombardy.
Culture
Architecture
Between 1890 and 1899, more than 6,500 Italians arrived in the country, the vast majority arriving at the port of Libertad, and among them several architects and other Italian professionals arrived, such as those who built the Teatro de Santa Ana in Santa Ana. In 1890, in fact, the construction of the Theater was entrusted to the company Sociedad Constructora de Occidente, directed by the Italian architects Francesco Durini Vasalli and Cristóbal Molinari. In turn, the Italian artists Luis Arcangeli and Guglielmo Arone were hired. The theater's original curtain was in the Modernisme style, created by the Italian artist Antonio Rovescalli. Many other Italians have built various palaces and monuments in El Salvador. In fact, in the country there are many churches and houses of Italian style, an example is the Iglesia del Calvario in Santa Ana, which was built and designed with the support of the Italians.
Music and dance
National dance and music such as Adentro Cojutepeque and Carnaval En San Miguel, were made by Francisco Palaviccini, who was a composer of Italian origin, in 1819, while the national anthem of El Salvador was composed by General Salvadoran Juan José Cañas and the Italian musician Juan Aberle.
The ballet is a dance that is also considered national in El Salvador and which has been transformed into the national folk ballet with Italian and Salvadoran heritage.
Cuisine
In El Salvador there are many Italian restaurants, but the Italians have also spread Italian foods such as pasta, which is widely consumed with different recipes of Italian origin but also coming from globalization. Macaroni and spaghetti are the favorite and most consumed in El Salvador and are mainly prepared with tomato, chicken and sauce.
On the other hand, pizza, which is the best known Italian dish in the world, is also widespread in El Salvador. In El Salvador there are both traditional Italian, American and Salvadoran varieties of pizza. Pizza has also evolved with new ingredients such as Salvadoran-style pizza. Salvadoran pizzas are usually prepared with cheese, tomatoes, green pepper, onion and other ingredients added by Salvadoran gastronomy.
Italian cheeses are also widespread in El Salvador, the most popular of which is mozzarella, made from whole milk. As for desserts, the most popular are Neapolitan ice cream, tiramisu and ciambelle.
Italian community
As of 2009, the Italian community in El Salvador is officially made up of 2,300 Italian citizens, while Salvadoran citizens with Italian descent exceed 200,000, corresponding to about 3% of the total population.
Most of the Italian community, including Italians and Italian-Salvadorans, live in the capital San Salvador or in its surroundings, such as Santa Tecla and Santa Ana. Several of its members have distinguished themselves in society, commerce, industry and the arts.
Institutions
Since 1991, El Salvador has had a local office of the Italian Dante Alighieri Society, an institution responsible for the study and diffusion of the Italian language, as well as the diffusion of Italian culture in the world.
Notable Italian Salvadorans
Juan Aberle, conductor and composer
Pablo Mauricio Alvergue, Vice President of El Salvador 1982-1984
Arturo Ambrogi, writer and journalist
Maribel Arrieta, Miss El Salvador 1955, distant Italian ancestry, great-great grandfather was originally from Novi Ligure
Enrique Borgo Bustamante, Vice President during the administration of Armando Calderón Sol
Mauricio Borgonovo Pohl, Minister of Foreign Affairs 1972-1977
Roberto Edmundo Canessa, Minister of Foreign Affairs 1950-1954
Erick Cabalceta, footballer
Eleonora Carrillo Alammani, model, Miss El Salvador 1995
Gerardo Celasco, actor
Alfredo Cristiani, President of El Salvador 1989-1994
Antonio Ferracuti, olympic swimmer
Carmen Ferracuti
Donatella Ferracuti
Piero Ferracuti
Jorge Ismael García Corleto, writer
Porfirio Giammattei Machon, paternal grandfather of Guatemalan president Alejandro Giammattei
Angelo Iannuzzelli, olympic athlete
Enrico Massi, aviator
Conrado Miranda, footballer
Francesca Miranda, fashion designer
Gabriel Núñez, footballer
Richard Oriani, scientist
Francisco Palaviccini, composer and singer
Guillermo Ragazzone, footballer
José Rosi, Colonial mayor of San Salvador
María Elisa Soler y Borghi, mother of Carlo Emanuele Ruspoli, 3rd Duke of Morignano
Cosma Spessotto, priest
Elena Tedesco, beauty queen, Nuestra Belleza El Salvador World 2009
Marcelo Tejeda Brugnoli, footballer
Carbilio Tomasino, football coach
Ricardo Tomasino, footballer
Larissa Vega Graniello, beauty queen, Nuestra Belleza El Salvador World 2014
Elizabeth Zaragoza, long distance runner
See also
Italian diaspora
References
Bibliography
Favero, Luigi; Tassello, Graziano. Cent'anni di emigrazione italiana (1861 - 1961). CSER. Roma, 1981. (In Italian)
Ethnic groups in El Salvador
El Salvador
Salvadorans |
Lemonora (foaled 1918) was a British Thoroughbred racehorse owned by Joseph Watson, 1st Baron Manton. Ridden by Joe Childs he won the Grand Prix de Paris on 26 June 1921, one mile seven furlongs, beating a large field, with a prize of 400,000 French Francs (about £16,830) then the world's most valuable racing prize. Just 26 days before, on 1 June 1921 he came third in the Derby, having in early May come second in the Classic 2000 Guineas at Newmarket. In 1920 he won the Champagne Stakes at Doncaster and came second in the Gimcrack Stakes at York.
His subsequent breeding career was disappointing, as he was "a bad sire". The unusually feminine sounding name for a stallion appears to be from a variety of azalea created in 1912 whose flowers are "moderate yellow, tinted pink externally".
Lemonora is immortalised in the
1935 Alfred Hitchcock film The 39 Steps when the names of the first three horses in the 1921 Derby are recounted on stage by "Mr Memory".
External links
British Pathé newsreel of Lemonora winning the 1921 Grand Prix, and afterward with owner Watson in the winner's enclosure
References
1918 racehorse births
Racehorses bred in the Kingdom of Great Britain |
Howard Kyle (April 22, 1861 – December 1, 1950) was an American stage and screen actor and lecturer active for over 50 years. He was a founding member and one-time recording-secretary of Actors' Equity and a sixty-year member of The Players Club. Kyle was perhaps best remembered for his starring roles in the turn of the century plays Way Down East, Nathan Hale and John Ermine of the Yellowstone.
Early life
Born Howard Anderson Vandergrift at Shullsburg, Wisconsin, Kyle was the son of Captain Howard Vandergrift, a veteran of the Mexican–American War who later served during the American Civil war as the first commander of the Shullsburg Light Guard, later known as Company I, Third Regiment Wisconsin Volunteers. Kyle was later raised in Mt. Carroll, Illinois where his father may have been a proprietor of H. & C. Vandergrift, a general merchandising store. Kyle attended the Mt. Carroll Union School, where he studied Latin and philosophy and was named valedictorian of the 1879 graduating class. At home Kyle received private instructions in French and literature and after high school studied law for two years. By his early teens Kyle had won an oration competition and acquired a keen interest in the works of William Shakespeare. He began his acting career in amateur theatre as Kyle Vandergrift and made his professional stage debut at the age of 23 under the name Howard Kyle.
Career
Kyle's debuted as Guildenstern and the Second Grave Digger in Shakespeare's Hamlet at the Meyer's Opera House in Janesville, Wisconsin, on September 10, 1884. He spent the following twelve seasons in tours with a number of large classical repertory companies and made his first appearance in New York in 1887 at the Windsor Theatre as Lucius in the James Sheridan Knowles play Virginius. During the mid-1890s Kyle played leading man roles with stock companies in Salt Lake City, Pittsburg and San Francisco. In late 1897 Kyle began a two-year run at the Manhattan Theatre and national tour of the Grismer and Parker pastoral play Way Down East, playing David Bartlett to Phoebe Davies' Anna Moore. During the season of 1900/01 he played the title role in a successful tour of the Clyde Fitch romantic drama Nathan Hale, with co-star Nanette Comstock as Alice Adams. Kyle was Sir Jasper Thorndyke, the lead character in a 1904 tour of Louis Parker's four-act comedy, Rosemary, and the next year played the title role in a tour of Louis Shipman's adaptation of the Frederic Remington western, John Ermine of the Yellowstone. Kyle later toured with Rose Coghlan's company playing Henry Beauclerc to Coghlan's Countess Zicka in the Victorien Sardou play Diplomacy.
Kyle played Wolfgang Amadeus Mozart in Ivy Ashton Root's The Greater Love at Madison Square Theatre on March 19, 1906, and on September 30 of the next year, performed the title role in Henry Arthur Jones' The Evangelist at the Knickerbocker Theatre. In 1908 Kyle toured as Mr. Johnson in a vaudeville sketch entitled This Woman and That Man. At Maxine Elliott's Theatre on February 22, 1909 Kyle played Scarus in Antony and Cleopatra, and on November 6 played the same part in the first performance held at the recently built New Theatre. In 1910 Kyle played Manson, with Henry Miller's Associate Players in Charles Rann Kennedy's The Servant In the House, and that November 30 acted the part of Castor, with the Coburn Players in Electra, staged at the Hudson Theatre.
Kyle was "The Voice" in Mary Magdalene, produced at the New Theatre on December 5, 1910, and on January 19 of the next year he played Conrad Borinski at the Astor Theatre with Lena Ashwell in the C. M. S. McLellan play Judith Zaraine. Later in 1911 Kyle toured with the Coburn Players in classical repertory productions and in July of the following year with his own company played Malvolio in Shakespeare's comedy, Twelfth Night, at the Greek Theatre, Mt. Kisco, and the title role in Nathan the Wise at the campus of New York University.
Though Kyle would return to the stage many times over the following two decades, his last major Broadway role was probably Simeon in Louis Parker's 1913 pageant play, Joseph and His Brethren, which ran at the Century Theatre for 121 performances. Over his career Kyle often appeared on the lecture circuit giving talks on subjects relating to the theatre. He performed in a handful of silent films between 1912 and 1918, such as Don’t Pinch My Pup (1912) with Riley Chamberlin; A Star Reborn (1912) with Florence La Badie; National Red Cross Pageant (1917) with Ethel Barrymore; The Purple Lily (1918) with Frank Mayo and Kitty Gordon; and Wild Honey (1918) with Frank Mills and Doris Kenyon.
Actors' Equity
Kyle was a founding member of the Actors' Equity Association and served as their first recording secretary. He resigned in 1919 over a schism involving the direction the organization was going after the members voted to join the American Federation of Labor. Kyle later served as secretary to the Actors' Fidelity League, a rival organization headed by George M. Cohan.
Marriage
Kyle married actress Amy Urcilla Hodges, a sister-in-law of the writer Louis Joseph Vance, at Fort Lee, New Jersey on June 28, 1915. They had met at the Playhouse Theatre the previous year during a production of the Harvey O'Higgins and Harriet Ford story, Polygamy, in which Kyle played the Profit to Hodges’ Charlotte Marini.
Death
Kyle died aged 89, at a New York City nursing home on December 1, 1950. He was survived by his wife.
Selected filmography
National Red Cross Pageant (1917)
The Purple Lily (1918)
Wild Honey (1918)
Resources
External links
Howard Kyle papers, 1870s-1954, held by the Billy Rose Theatre Division, New York Public Library for the Performing Arts
1861 births
1950 deaths
American male stage actors
American male silent film actors
People from Mount Carroll, Illinois
People from Shullsburg, Wisconsin
20th-century American male actors |
```smalltalk
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics;
using System.Security;
using System.Text;
using Microsoft.Toolkit.Uwp.UI.Automation.Peers;
using Microsoft.Toolkit.Uwp.UI.Controls.DataGridInternals;
using Microsoft.Toolkit.Uwp.UI.Controls.Primitives;
using Microsoft.Toolkit.Uwp.UI.Controls.Utilities;
using Microsoft.Toolkit.Uwp.UI.Data.Utilities;
using Microsoft.Toolkit.Uwp.UI.Utilities;
using Microsoft.Toolkit.Uwp.Utilities;
using Windows.ApplicationModel.DataTransfer;
using Windows.Devices.Input;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.System;
using Windows.UI.Input;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Automation.Peers;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Media.Animation;
using DiagnosticsDebug = System.Diagnostics.Debug;
namespace Microsoft.Toolkit.Uwp.UI.Controls
{
/// <summary>
/// Control to represent data in columns and rows.
/// </summary>
#if FEATURE_VALIDATION_SUMMARY
[TemplatePart(Name = DataGrid.DATAGRID_elementValidationSummary, Type = typeof(ValidationSummary))]
#endif
[TemplatePart(Name = DataGrid.DATAGRID_elementRowsPresenterName, Type = typeof(DataGridRowsPresenter))]
[TemplatePart(Name = DataGrid.DATAGRID_elementColumnHeadersPresenterName, Type = typeof(DataGridColumnHeadersPresenter))]
[TemplatePart(Name = DataGrid.DATAGRID_elementFrozenColumnScrollBarSpacerName, Type = typeof(FrameworkElement))]
[TemplatePart(Name = DataGrid.DATAGRID_elementHorizontalScrollBarName, Type = typeof(ScrollBar))]
[TemplatePart(Name = DataGrid.DATAGRID_elementVerticalScrollBarName, Type = typeof(ScrollBar))]
[TemplateVisualState(Name = VisualStates.StateDisabled, GroupName = VisualStates.GroupCommon)]
[TemplateVisualState(Name = VisualStates.StateNormal, GroupName = VisualStates.GroupCommon)]
[TemplateVisualState(Name = VisualStates.StateTouchIndicator, GroupName = VisualStates.GroupScrollBars)]
[TemplateVisualState(Name = VisualStates.StateMouseIndicator, GroupName = VisualStates.GroupScrollBars)]
[TemplateVisualState(Name = VisualStates.StateMouseIndicatorFull, GroupName = VisualStates.GroupScrollBars)]
[TemplateVisualState(Name = VisualStates.StateNoIndicator, GroupName = VisualStates.GroupScrollBars)]
[TemplateVisualState(Name = VisualStates.StateSeparatorExpanded, GroupName = VisualStates.GroupScrollBarsSeparator)]
[TemplateVisualState(Name = VisualStates.StateSeparatorCollapsed, GroupName = VisualStates.GroupScrollBarsSeparator)]
[TemplateVisualState(Name = VisualStates.StateSeparatorExpandedWithoutAnimation, GroupName = VisualStates.GroupScrollBarsSeparator)]
[TemplateVisualState(Name = VisualStates.StateSeparatorCollapsedWithoutAnimation, GroupName = VisualStates.GroupScrollBarsSeparator)]
[TemplateVisualState(Name = VisualStates.StateInvalid, GroupName = VisualStates.GroupValidation)]
[TemplateVisualState(Name = VisualStates.StateValid, GroupName = VisualStates.GroupValidation)]
[StyleTypedProperty(Property = "CellStyle", StyleTargetType = typeof(DataGridCell))]
[StyleTypedProperty(Property = "ColumnHeaderStyle", StyleTargetType = typeof(DataGridColumnHeader))]
[StyleTypedProperty(Property = "DragIndicatorStyle", StyleTargetType = typeof(ContentControl))]
[StyleTypedProperty(Property = "DropLocationIndicatorStyle", StyleTargetType = typeof(Control))]
[StyleTypedProperty(Property = "RowHeaderStyle", StyleTargetType = typeof(DataGridRowHeader))]
[StyleTypedProperty(Property = "RowStyle", StyleTargetType = typeof(DataGridRow))]
public partial class DataGrid : Control
{
private enum ScrollBarVisualState
{
NoIndicator,
TouchIndicator,
MouseIndicator,
MouseIndicatorFull
}
private enum ScrollBarsSeparatorVisualState
{
SeparatorCollapsed,
SeparatorExpanded,
SeparatorExpandedWithoutAnimation,
SeparatorCollapsedWithoutAnimation
}
#if FEATURE_VALIDATION_SUMMARY
private const string DATAGRID_elementValidationSummary = "ValidationSummary";
#endif
private const string DATAGRID_elementRootName = "Root";
private const string DATAGRID_elementRowsPresenterName = "RowsPresenter";
private const string DATAGRID_elementColumnHeadersPresenterName = "ColumnHeadersPresenter";
private const string DATAGRID_elementFrozenColumnScrollBarSpacerName = "FrozenColumnScrollBarSpacer";
private const string DATAGRID_elementHorizontalScrollBarName = "HorizontalScrollBar";
private const string DATAGRID_elementRowHeadersPresenterName = "RowHeadersPresenter";
private const string DATAGRID_elementTopLeftCornerHeaderName = "TopLeftCornerHeader";
private const string DATAGRID_elementTopRightCornerHeaderName = "TopRightCornerHeader";
private const string DATAGRID_elementBottomRightCornerHeaderName = "BottomRightCorner";
private const string DATAGRID_elementVerticalScrollBarName = "VerticalScrollBar";
private const bool DATAGRID_defaultAutoGenerateColumns = true;
private const bool DATAGRID_defaultCanUserReorderColumns = true;
private const bool DATAGRID_defaultCanUserResizeColumns = true;
private const bool DATAGRID_defaultCanUserSortColumns = true;
private const DataGridGridLinesVisibility DATAGRID_defaultGridLinesVisibility = DataGridGridLinesVisibility.None;
private const DataGridHeadersVisibility DATAGRID_defaultHeadersVisibility = DataGridHeadersVisibility.Column;
private const DataGridRowDetailsVisibilityMode DATAGRID_defaultRowDetailsVisibility = DataGridRowDetailsVisibilityMode.VisibleWhenSelected;
private const DataGridSelectionMode DATAGRID_defaultSelectionMode = DataGridSelectionMode.Extended;
private const ScrollBarVisibility DATAGRID_defaultScrollBarVisibility = ScrollBarVisibility.Auto;
/// <summary>
/// The default order to use for columns when there is no <see cref="DisplayAttribute.Order"/>
/// value available for the property.
/// </summary>
/// <remarks>
/// The value of 10,000 comes from the DataAnnotations spec, allowing
/// some properties to be ordered at the beginning and some at the end.
/// </remarks>
private const int DATAGRID_defaultColumnDisplayOrder = 10000;
private const double DATAGRID_horizontalGridLinesThickness = 1;
private const double DATAGRID_minimumRowHeaderWidth = 4;
private const double DATAGRID_minimumColumnHeaderHeight = 4;
internal const double DATAGRID_maximumStarColumnWidth = 10000;
internal const double DATAGRID_minimumStarColumnWidth = 0.001;
private const double DATAGRID_mouseWheelDeltaDivider = 4.0;
private const double DATAGRID_maxHeadersThickness = 32768;
private const double DATAGRID_defaultRowHeight = 22;
internal const double DATAGRID_defaultRowGroupSublevelIndent = 20;
private const double DATAGRID_defaultMinColumnWidth = 20;
private const double DATAGRID_defaultMaxColumnWidth = double.PositiveInfinity;
private const double DATAGRID_defaultIncrementalLoadingThreshold = 3.0;
private const double DATAGRID_defaultDataFetchSize = 3.0;
// 2 seconds delay used to hide the scroll bars for example when OS animations are turned off.
private const int DATAGRID_noScrollBarCountdownMs = 2000;
// Used to work around double arithmetic rounding.
private const double DATAGRID_roundingDelta = 0.0001;
// DataGrid Template Parts
#if FEATURE_VALIDATION_SUMMARY
private ValidationSummary _validationSummary;
#endif
private UIElement _bottomRightCorner;
private DataGridColumnHeadersPresenter _columnHeadersPresenter;
private ScrollBar _hScrollBar;
private DataGridRowsPresenter _rowsPresenter;
private ScrollBar _vScrollBar;
private byte _autoGeneratingColumnOperationCount;
private bool _autoSizingColumns;
private List<ValidationResult> _bindingValidationResults;
private ContentControl _clipboardContentControl;
private IndexToValueTable<Visibility> _collapsedSlotsTable;
private bool _columnHeaderHasFocus;
private DataGridCellCoordinates _currentCellCoordinates;
// used to store the current column during a Reset
private int _desiredCurrentColumnIndex;
private int _editingColumnIndex;
private RoutedEventArgs _editingEventArgs;
private bool _executingLostFocusActions;
private bool _flushCurrentCellChanged;
private bool _focusEditingControl;
private FocusInputDeviceKind _focusInputDevice;
private DependencyObject _focusedObject;
private DataGridRow _focusedRow;
private FrameworkElement _frozenColumnScrollBarSpacer;
private bool _hasNoIndicatorStateStoryboardCompletedHandler;
private DispatcherQueueTimer _hideScrollBarsTimer;
// the sum of the widths in pixels of the scrolling columns preceding
// the first displayed scrolling column
private double _horizontalOffset;
private byte _horizontalScrollChangesIgnored;
private bool _ignoreNextScrollBarsLayout;
private List<ValidationResult> _indeiValidationResults;
private bool _initializingNewItem;
private bool _isHorizontalScrollBarInteracting;
private bool _isVerticalScrollBarInteracting;
// Set to True when the pointer is over the optional scroll bars.
private bool _isPointerOverHorizontalScrollBar;
private bool _isPointerOverVerticalScrollBar;
// Set to True to prevent the normal fade-out of the scroll bars.
private bool _keepScrollBarsShowing;
// Nth row of rows 0..N that make up the RowHeightEstimate
private int _lastEstimatedRow;
private List<DataGridRow> _loadedRows;
// prevents reentry into the VerticalScroll event handler
private Queue<Action> _lostFocusActions;
private bool _makeFirstDisplayedCellCurrentCellPending;
private bool _measured;
// the number of pixels of the firstDisplayedScrollingCol which are not displayed
private double _negHorizontalOffset;
// the number of pixels of DisplayData.FirstDisplayedScrollingRow which are not displayed
private int _noCurrentCellChangeCount;
private int _noFocusedColumnChangeCount;
private int _noSelectionChangeCount;
private double _oldEdgedRowsHeightCalculated = 0.0;
// Set to True to favor mouse indicators over panning indicators for the scroll bars.
private bool _preferMouseIndicators;
private DataGridCellCoordinates _previousAutomationFocusCoordinates;
private DataGridColumn _previousCurrentColumn;
private object _previousCurrentItem;
private List<ValidationResult> _propertyValidationResults;
private ScrollBarVisualState _proposedScrollBarsState;
private ScrollBarsSeparatorVisualState _proposedScrollBarsSeparatorState;
private string _rowGroupHeaderPropertyNameAlternative;
private ObservableCollection<Style> _rowGroupHeaderStyles;
// To figure out what the old RowGroupHeaderStyle was for each level, we need to keep a copy
// of the list. The old style important so we don't blow away styles set directly on the RowGroupHeader
private List<Style> _rowGroupHeaderStylesOld;
private double[] _rowGroupHeightsByLevel;
private double _rowHeaderDesiredWidth;
private Size? _rowsPresenterAvailableSize;
private bool _scrollingByHeight;
private DataGridSelectedItemsCollection _selectedItems;
private IndexToValueTable<Visibility> _showDetailsTable;
// Set to True when the mouse scroll bars are currently showing.
private bool _showingMouseIndicators;
private bool _successfullyUpdatedSelection;
private bool _temporarilyResetCurrentCell;
private bool _isUserSorting; // True if we're currently in a user invoked sorting operation
private ContentControl _topLeftCornerHeader;
private ContentControl _topRightCornerHeader;
private object _uneditedValue; // Represents the original current cell value at the time it enters editing mode.
private string _updateSourcePath;
private Dictionary<INotifyDataErrorInfo, string> _validationItems;
private List<ValidationResult> _validationResults;
private byte _verticalScrollChangesIgnored;
#if FEATURE_ICOLLECTIONVIEW_GROUP
private INotifyCollectionChanged _topLevelGroup;
#else
private IObservableVector<object> _topLevelGroup;
#endif
#if FEATURE_VALIDATION_SUMMARY
private ValidationSummaryItem _selectedValidationSummaryItem;
#endif
// An approximation of the sum of the heights in pixels of the scrolling rows preceding
// the first displayed scrolling row. Since the scrolled off rows are discarded, the grid
// does not know their actual height. The heights used for the approximation are the ones
// set as the rows were scrolled off.
private double _verticalOffset;
#if FEATURE_ICOLLECTIONVIEW_GROUP
// Cache event listeners for PropertyChanged and CollectionChanged events from CollectionViewGroups
private Dictionary<INotifyPropertyChanged, WeakEventListener<DataGrid, object, PropertyChangedEventArgs>> _groupsPropertyChangedListenersTable = new Dictionary<INotifyPropertyChanged, WeakEventListener<DataGrid, object, PropertyChangedEventArgs>>();
private Dictionary<INotifyCollectionChanged, WeakEventListener<DataGrid, object, NotifyCollectionChangedEventArgs>> _groupsCollectionChangedListenersTable = new Dictionary<INotifyCollectionChanged, WeakEventListener<DataGrid, object, NotifyCollectionChangedEventArgs>>();
#else
// Cache event listeners for VectorChanged events from ICollectionViewGroup's GroupItems
private Dictionary<IObservableVector<object>, WeakEventListener<DataGrid, object, IVectorChangedEventArgs>> _groupsVectorChangedListenersTable = new Dictionary<IObservableVector<object>, WeakEventListener<DataGrid, object, IVectorChangedEventArgs>>();
#endif
/// <summary>
/// Occurs one time for each public, non-static property in the bound data type when the
/// <see cref="ItemsSource"/> property is changed and the
/// <see cref="AutoGenerateColumns"/> property is true.
/// </summary>
public event EventHandler<DataGridAutoGeneratingColumnEventArgs> AutoGeneratingColumn;
/// <summary>
/// Occurs before a cell or row enters editing mode.
/// </summary>
public event EventHandler<DataGridBeginningEditEventArgs> BeginningEdit;
/// <summary>
/// Occurs after cell editing has ended.
/// </summary>
public event EventHandler<DataGridCellEditEndedEventArgs> CellEditEnded;
/// <summary>
/// Occurs immediately before cell editing has ended.
/// </summary>
public event EventHandler<DataGridCellEditEndingEventArgs> CellEditEnding;
/// <summary>
/// Occurs when the <see cref="Microsoft.Toolkit.Uwp.UI.Controls.DataGridColumn.DisplayIndex"/>
/// property of a column changes.
/// </summary>
public event EventHandler<DataGridColumnEventArgs> ColumnDisplayIndexChanged;
/// <summary>
/// Occurs when the user drops a column header that was being dragged using the mouse.
/// </summary>
public event EventHandler<DragCompletedEventArgs> ColumnHeaderDragCompleted;
/// <summary>
/// Occurs one or more times while the user drags a column header using the mouse.
/// </summary>
public event EventHandler<DragDeltaEventArgs> ColumnHeaderDragDelta;
/// <summary>
/// Occurs when the user begins dragging a column header using the mouse.
/// </summary>
public event EventHandler<DragStartedEventArgs> ColumnHeaderDragStarted;
/// <summary>
/// Raised when column reordering ends, to allow subscribers to clean up.
/// </summary>
public event EventHandler<DataGridColumnEventArgs> ColumnReordered;
/// <summary>
/// Raised when starting a column reordering action. Subscribers to this event can
/// set tooltip and caret UIElements, constrain tooltip position, indicate that
/// a preview should be shown, or cancel reordering.
/// </summary>
public event EventHandler<DataGridColumnReorderingEventArgs> ColumnReordering;
/// <summary>
/// This event is raised by OnCopyingRowClipboardContent method after the default row content is prepared.
/// Event listeners can modify or add to the row clipboard content.
/// </summary>
public event EventHandler<DataGridRowClipboardEventArgs> CopyingRowClipboardContent;
/// <summary>
/// Occurs when a different cell becomes the current cell.
/// </summary>
public event EventHandler<EventArgs> CurrentCellChanged;
/// <summary>
/// Occurs after a <see cref="DataGridRow"/>
/// is instantiated, so that you can customize it before it is used.
/// </summary>
public event EventHandler<DataGridRowEventArgs> LoadingRow;
/// <summary>
/// Occurs when a new row details template is applied to a row, so that you can customize
/// the details section before it is used.
/// </summary>
public event EventHandler<DataGridRowDetailsEventArgs> LoadingRowDetails;
/// <summary>
/// Occurs before a DataGridRowGroupHeader header is used.
/// </summary>
public event EventHandler<DataGridRowGroupHeaderEventArgs> LoadingRowGroup;
/// <summary>
/// Occurs when a cell in a <see cref="DataGridTemplateColumn"/> enters editing mode.
/// </summary>
public event EventHandler<DataGridPreparingCellForEditEventArgs> PreparingCellForEdit;
/// <summary>
/// Occurs when the <see cref="RowDetailsVisibilityMode"/>
/// property value changes.
/// </summary>
public event EventHandler<DataGridRowDetailsEventArgs> RowDetailsVisibilityChanged;
/// <summary>
/// Occurs when the row has been successfully committed or canceled.
/// </summary>
public event EventHandler<DataGridRowEditEndedEventArgs> RowEditEnded;
/// <summary>
/// Occurs immediately before the row has been successfully committed or canceled.
/// </summary>
public event EventHandler<DataGridRowEditEndingEventArgs> RowEditEnding;
/// <summary>
/// Occurs when the <see cref="SelectedItem"/> or
/// <see cref="SelectedItems"/> property value changes.
/// </summary>
public event SelectionChangedEventHandler SelectionChanged;
/// <summary>
/// Occurs when the <see cref="Microsoft.Toolkit.Uwp.UI.Controls.DataGridColumn"/> sorting request is triggered.
/// </summary>
public event EventHandler<DataGridColumnEventArgs> Sorting;
/// <summary>
/// Occurs when a <see cref="DataGridRow"/>
/// object becomes available for reuse.
/// </summary>
public event EventHandler<DataGridRowEventArgs> UnloadingRow;
/// <summary>
/// Occurs when the DataGridRowGroupHeader is available for reuse.
/// </summary>
public event EventHandler<DataGridRowGroupHeaderEventArgs> UnloadingRowGroup;
/// <summary>
/// Occurs when a row details element becomes available for reuse.
/// </summary>
public event EventHandler<DataGridRowDetailsEventArgs> UnloadingRowDetails;
/// <summary>
/// Initializes a new instance of the <see cref="DataGrid"/> class.
/// </summary>
public DataGrid()
{
this.TabNavigation = KeyboardNavigationMode.Once;
_loadedRows = new List<DataGridRow>();
_lostFocusActions = new Queue<Action>();
_selectedItems = new DataGridSelectedItemsCollection(this);
_rowGroupHeaderPropertyNameAlternative = Controls.Resources.DefaultRowGroupHeaderPropertyNameAlternative;
_rowGroupHeaderStyles = new ObservableCollection<Style>();
_rowGroupHeaderStyles.CollectionChanged += RowGroupHeaderStyles_CollectionChanged;
_rowGroupHeaderStylesOld = new List<Style>();
this.RowGroupHeadersTable = new IndexToValueTable<DataGridRowGroupInfo>();
_collapsedSlotsTable = new IndexToValueTable<Visibility>();
_validationItems = new Dictionary<INotifyDataErrorInfo, string>();
_validationResults = new List<ValidationResult>();
_bindingValidationResults = new List<ValidationResult>();
_propertyValidationResults = new List<ValidationResult>();
_indeiValidationResults = new List<ValidationResult>();
this.ColumnHeaderInteractionInfo = new DataGridColumnHeaderInteractionInfo();
this.DisplayData = new DataGridDisplayData(this);
this.ColumnsInternal = CreateColumnsInstance();
this.RowHeightEstimate = DATAGRID_defaultRowHeight;
this.RowDetailsHeightEstimate = 0;
_rowHeaderDesiredWidth = 0;
this.DataConnection = new DataGridDataConnection(this);
_showDetailsTable = new IndexToValueTable<Visibility>();
_focusInputDevice = FocusInputDeviceKind.None;
_proposedScrollBarsState = ScrollBarVisualState.NoIndicator;
_proposedScrollBarsSeparatorState = ScrollBarsSeparatorVisualState.SeparatorCollapsed;
this.AnchorSlot = -1;
_lastEstimatedRow = -1;
_editingColumnIndex = -1;
this.CurrentCellCoordinates = new DataGridCellCoordinates(-1, -1);
this.RowGroupHeaderHeightEstimate = DATAGRID_defaultRowHeight;
this.LastHandledKeyDown = VirtualKey.None;
this.DefaultStyleKey = typeof(DataGrid);
HookDataGridEvents();
}
/// <summary>
/// Gets or sets the <see cref="T:System.Windows.Media.Brush"/> that is used to paint the background of odd-numbered rows.
/// </summary>
/// <returns>
/// The brush that is used to paint the background of odd-numbered rows.
/// </returns>
public Brush AlternatingRowBackground
{
get { return GetValue(AlternatingRowBackgroundProperty) as Brush; }
set { SetValue(AlternatingRowBackgroundProperty, value); }
}
/// <summary>
/// Identifies the <see cref="AlternatingRowBackground"/>
/// dependency property.
/// </summary>
/// <returns>
/// The identifier for the <see cref="AlternatingRowBackground"/>
/// dependency property.
/// </returns>
public static readonly DependencyProperty AlternatingRowBackgroundProperty =
DependencyProperty.Register(
"AlternatingRowBackground",
typeof(Brush),
typeof(DataGrid),
new PropertyMetadata(null, OnAlternatingRowBackgroundPropertyChanged));
private static void OnAlternatingRowBackgroundPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
foreach (DataGridRow row in dataGrid.GetAllRows())
{
row.EnsureBackground();
}
}
/// <summary>
/// Gets or sets the <see cref="T:System.Windows.Media.Brush"/> that is used to paint the foreground of odd-numbered rows.
/// </summary>
/// <returns>
/// The brush that is used to paint the foreground of odd-numbered rows.
/// </returns>
public Brush AlternatingRowForeground
{
get { return GetValue(AlternatingRowForegroundProperty) as Brush; }
set { SetValue(AlternatingRowForegroundProperty, value); }
}
/// <summary>
/// Identifies the <see cref="AlternatingRowForeground"/>
/// dependency property.
/// </summary>
/// <returns>
/// The identifier for the <see cref="AlternatingRowForeground"/>
/// dependency property.
/// </returns>
public static readonly DependencyProperty AlternatingRowForegroundProperty =
DependencyProperty.Register(
"AlternatingRowForeground",
typeof(Brush),
typeof(DataGrid),
new PropertyMetadata(null, OnAlternatingRowForegroundPropertyChanged));
private static void OnAlternatingRowForegroundPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
foreach (DataGridRow row in dataGrid.GetAllRows())
{
row.EnsureForeground();
}
}
/// <summary>
/// Gets or sets a value indicating whether the row details sections remain
/// fixed at the width of the display area or can scroll horizontally.
/// </summary>
public bool AreRowDetailsFrozen
{
get { return (bool)GetValue(AreRowDetailsFrozenProperty); }
set { SetValue(AreRowDetailsFrozenProperty, value); }
}
/// <summary>
/// Identifies the AreRowDetailsFrozen dependency property.
/// </summary>
public static readonly DependencyProperty AreRowDetailsFrozenProperty =
DependencyProperty.Register(
"AreRowDetailsFrozen",
typeof(bool),
typeof(DataGrid),
null);
/// <summary>
/// Gets or sets a value indicating whether the row group header sections
/// remain fixed at the width of the display area or can scroll horizontally.
/// </summary>
public bool AreRowGroupHeadersFrozen
{
get { return (bool)GetValue(AreRowGroupHeadersFrozenProperty); }
set { SetValue(AreRowGroupHeadersFrozenProperty, value); }
}
/// <summary>
/// Identifies the AreRowDetailsFrozen dependency property.
/// </summary>
public static readonly DependencyProperty AreRowGroupHeadersFrozenProperty =
DependencyProperty.Register(
"AreRowGroupHeadersFrozen",
typeof(bool),
typeof(DataGrid),
new PropertyMetadata(true, OnAreRowGroupHeadersFrozenPropertyChanged));
private static void OnAreRowGroupHeadersFrozenPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
ProcessFrozenColumnCount(dataGrid);
// Update elements in the RowGroupHeader that were previously frozen.
if ((bool)e.NewValue)
{
if (dataGrid._rowsPresenter != null)
{
foreach (UIElement element in dataGrid._rowsPresenter.Children)
{
DataGridRowGroupHeader groupHeader = element as DataGridRowGroupHeader;
if (groupHeader != null)
{
groupHeader.ClearFrozenStates();
}
}
}
}
}
/// <summary>
/// Gets or sets a value indicating whether columns are created
/// automatically when the <see cref="ItemsSource"/> property is set.
/// </summary>
public bool AutoGenerateColumns
{
get { return (bool)GetValue(AutoGenerateColumnsProperty); }
set { SetValue(AutoGenerateColumnsProperty, value); }
}
/// <summary>
/// Identifies the AutoGenerateColumns dependency property.
/// </summary>
public static readonly DependencyProperty AutoGenerateColumnsProperty =
DependencyProperty.Register(
"AutoGenerateColumns",
typeof(bool),
typeof(DataGrid),
new PropertyMetadata(DATAGRID_defaultAutoGenerateColumns, OnAutoGenerateColumnsPropertyChanged));
private static void OnAutoGenerateColumnsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
bool value = (bool)e.NewValue;
if (value)
{
dataGrid.InitializeElements(false /*recycleRows*/);
}
else
{
dataGrid.RemoveAutoGeneratedColumns();
}
}
/// <summary>
/// Gets or sets a value indicating whether the user can change
/// the column display order by dragging column headers with the mouse.
/// </summary>
public bool CanUserReorderColumns
{
get { return (bool)GetValue(CanUserReorderColumnsProperty); }
set { SetValue(CanUserReorderColumnsProperty, value); }
}
/// <summary>
/// Identifies the CanUserReorderColumns dependency property.
/// </summary>
public static readonly DependencyProperty CanUserReorderColumnsProperty =
DependencyProperty.Register(
"CanUserReorderColumns",
typeof(bool),
typeof(DataGrid),
new PropertyMetadata(DATAGRID_defaultCanUserReorderColumns));
/// <summary>
/// Gets or sets a value indicating whether the user can adjust column widths using the mouse.
/// </summary>
public bool CanUserResizeColumns
{
get { return (bool)GetValue(CanUserResizeColumnsProperty); }
set { SetValue(CanUserResizeColumnsProperty, value); }
}
/// <summary>
/// Identifies the CanUserResizeColumns dependency property.
/// </summary>
public static readonly DependencyProperty CanUserResizeColumnsProperty =
DependencyProperty.Register(
"CanUserResizeColumns",
typeof(bool),
typeof(DataGrid),
new PropertyMetadata(DATAGRID_defaultCanUserResizeColumns, OnCanUserResizeColumnsPropertyChanged));
/// <summary>
/// CanUserResizeColumns property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its CanUserResizeColumns.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnCanUserResizeColumnsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
dataGrid.EnsureHorizontalLayout();
}
/// <summary>
/// Gets or sets a value indicating whether the user can sort columns by clicking the column header.
/// </summary>
public bool CanUserSortColumns
{
get { return (bool)GetValue(CanUserSortColumnsProperty); }
set { SetValue(CanUserSortColumnsProperty, value); }
}
/// <summary>
/// Identifies the CanUserSortColumns dependency property.
/// </summary>
public static readonly DependencyProperty CanUserSortColumnsProperty =
DependencyProperty.Register(
"CanUserSortColumns",
typeof(bool),
typeof(DataGrid),
new PropertyMetadata(DATAGRID_defaultCanUserSortColumns));
/// <summary>
/// Gets or sets the style that is used when rendering the data grid cells.
/// </summary>
public Style CellStyle
{
get { return GetValue(CellStyleProperty) as Style; }
set { SetValue(CellStyleProperty, value); }
}
/// <summary>
/// Identifies the <see cref="CellStyle"/> dependency property.
/// </summary>
public static readonly DependencyProperty CellStyleProperty =
DependencyProperty.Register(
"CellStyle",
typeof(Style),
typeof(DataGrid),
new PropertyMetadata(null, OnCellStylePropertyChanged));
private static void OnCellStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (dataGrid != null)
{
Style previousStyle = e.OldValue as Style;
foreach (DataGridRow row in dataGrid.GetAllRows())
{
foreach (DataGridCell cell in row.Cells)
{
cell.EnsureStyle(previousStyle);
}
row.FillerCell.EnsureStyle(previousStyle);
}
dataGrid.InvalidateRowHeightEstimate();
}
}
/// <summary>
/// Gets or sets the property which determines how DataGrid content is copied to the Clipboard.
/// </summary>
public DataGridClipboardCopyMode ClipboardCopyMode
{
get { return (DataGridClipboardCopyMode)GetValue(ClipboardCopyModeProperty); }
set { SetValue(ClipboardCopyModeProperty, value); }
}
/// <summary>
/// Identifies the <see cref="ClipboardCopyMode"/> dependency property.
/// </summary>
public static readonly DependencyProperty ClipboardCopyModeProperty =
DependencyProperty.Register(
"ClipboardCopyMode",
typeof(DataGridClipboardCopyMode),
typeof(DataGrid),
new PropertyMetadata(DataGridClipboardCopyMode.ExcludeHeader));
/// <summary>
/// Gets or sets the height of the column headers row.
/// </summary>
public double ColumnHeaderHeight
{
get { return (double)GetValue(ColumnHeaderHeightProperty); }
set { SetValue(ColumnHeaderHeightProperty, value); }
}
/// <summary>
/// Identifies the ColumnHeaderHeight dependency property.
/// </summary>
public static readonly DependencyProperty ColumnHeaderHeightProperty =
DependencyProperty.Register(
"ColumnHeaderHeight",
typeof(double),
typeof(DataGrid),
new PropertyMetadata(double.NaN, OnColumnHeaderHeightPropertyChanged));
/// <summary>
/// ColumnHeaderHeightProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its ColumnHeaderHeight.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnColumnHeaderHeightPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (!dataGrid.IsHandlerSuspended(e.Property))
{
double value = (double)e.NewValue;
if (value < DATAGRID_minimumColumnHeaderHeight)
{
dataGrid.SetValueNoCallback(e.Property, e.OldValue);
throw DataGridError.DataGrid.ValueMustBeGreaterThanOrEqualTo("value", "ColumnHeaderHeight", DATAGRID_minimumColumnHeaderHeight);
}
if (value > DATAGRID_maxHeadersThickness)
{
dataGrid.SetValueNoCallback(e.Property, e.OldValue);
throw DataGridError.DataGrid.ValueMustBeLessThanOrEqualTo("value", "ColumnHeaderHeight", DATAGRID_maxHeadersThickness);
}
dataGrid.InvalidateMeasure();
}
}
/// <summary>
/// Gets or sets the style that is used when rendering the column headers.
/// </summary>
public Style ColumnHeaderStyle
{
get { return GetValue(ColumnHeaderStyleProperty) as Style; }
set { SetValue(ColumnHeaderStyleProperty, value); }
}
/// <summary>
/// Identifies the ColumnHeaderStyle dependency property.
/// </summary>
public static readonly DependencyProperty ColumnHeaderStyleProperty =
DependencyProperty.Register(
"ColumnHeaderStyle",
typeof(Style),
typeof(DataGrid),
new PropertyMetadata(null, OnColumnHeaderStylePropertyChanged));
private static void OnColumnHeaderStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
// TODO: ColumnHeaderStyle should be applied to the TopLeftCorner and the TopRightCorner as well
DataGrid dataGrid = d as DataGrid;
if (dataGrid != null)
{
Style previousStyle = e.OldValue as Style;
foreach (DataGridColumn column in dataGrid.Columns)
{
column.HeaderCell.EnsureStyle(previousStyle);
}
if (dataGrid.ColumnsInternal.FillerColumn != null)
{
dataGrid.ColumnsInternal.FillerColumn.HeaderCell.EnsureStyle(previousStyle);
}
}
}
/// <summary>
/// Gets or sets the standard width or automatic sizing mode of columns in the control.
/// </summary>
public DataGridLength ColumnWidth
{
get { return (DataGridLength)GetValue(ColumnWidthProperty); }
set { SetValue(ColumnWidthProperty, value); }
}
/// <summary>
/// Identifies the ColumnWidth dependency property.
/// </summary>
public static readonly DependencyProperty ColumnWidthProperty =
DependencyProperty.Register(
"ColumnWidth",
typeof(DataGridLength),
typeof(DataGrid),
new PropertyMetadata(DataGridLength.Auto, OnColumnWidthPropertyChanged));
/// <summary>
/// ColumnWidthProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its ColumnWidth.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnColumnWidthPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
foreach (DataGridColumn column in dataGrid.ColumnsInternal.GetDisplayedColumns())
{
if (column.InheritsWidth)
{
column.SetWidthInternalNoCallback(dataGrid.ColumnWidth);
}
}
dataGrid.EnsureHorizontalLayout();
}
/// <summary>
/// Gets or sets the amount of data to fetch for virtualizing/prefetch operations.
/// </summary>
/// <returns>
/// The amount of data to fetch per interval, in pages.
/// </returns>
public double DataFetchSize
{
get { return (double)GetValue(DataFetchSizeProperty); }
set { SetValue(DataFetchSizeProperty, value); }
}
/// <summary>
/// Identifies the <see cref="DataFetchSize"/> dependency property
/// </summary>
public static readonly DependencyProperty DataFetchSizeProperty =
DependencyProperty.Register(
nameof(DataFetchSize),
typeof(double),
typeof(DataGrid),
new PropertyMetadata(DATAGRID_defaultDataFetchSize, OnDataFetchSizePropertyChanged));
/// <summary>
/// DataFetchSizeProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its DataFetchSize.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnDataFetchSizePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (!dataGrid.IsHandlerSuspended(e.Property))
{
double oldValue = (double)e.OldValue;
double newValue = (double)e.NewValue;
if (double.IsNaN(newValue))
{
dataGrid.SetValueNoCallback(e.Property, oldValue);
throw DataGridError.DataGrid.ValueCannotBeSetToNAN(nameof(dataGrid.DataFetchSize));
}
if (newValue < 0)
{
dataGrid.SetValueNoCallback(e.Property, oldValue);
throw DataGridError.DataGrid.ValueMustBeGreaterThanOrEqualTo("value", nameof(dataGrid.DataFetchSize), 0);
}
}
}
/// <summary>
/// Gets or sets the style that is used when rendering the drag indicator
/// that is displayed while dragging column headers.
/// </summary>
public Style DragIndicatorStyle
{
get { return GetValue(DragIndicatorStyleProperty) as Style; }
set { SetValue(DragIndicatorStyleProperty, value); }
}
/// <summary>
/// Identifies the <see cref="DragIndicatorStyle"/>
/// dependency property.
/// </summary>
public static readonly DependencyProperty DragIndicatorStyleProperty =
DependencyProperty.Register(
"DragIndicatorStyle",
typeof(Style),
typeof(DataGrid),
null);
/// <summary>
/// Gets or sets the style that is used when rendering the column headers.
/// </summary>
public Style DropLocationIndicatorStyle
{
get { return GetValue(DropLocationIndicatorStyleProperty) as Style; }
set { SetValue(DropLocationIndicatorStyleProperty, value); }
}
/// <summary>
/// Identifies the <see cref="DropLocationIndicatorStyle"/>
/// dependency property.
/// </summary>
public static readonly DependencyProperty DropLocationIndicatorStyleProperty =
DependencyProperty.Register(
"DropLocationIndicatorStyle",
typeof(Style),
typeof(DataGrid),
null);
/// <summary>
/// Gets or sets the number of columns that the user cannot scroll horizontally.
/// </summary>
public int FrozenColumnCount
{
get { return (int)GetValue(FrozenColumnCountProperty); }
set { SetValue(FrozenColumnCountProperty, value); }
}
/// <summary>
/// Identifies the <see cref="FrozenColumnCount"/>
/// dependency property.
/// </summary>
public static readonly DependencyProperty FrozenColumnCountProperty =
DependencyProperty.Register(
"FrozenColumnCount",
typeof(int),
typeof(DataGrid),
new PropertyMetadata(0, OnFrozenColumnCountPropertyChanged));
private static void OnFrozenColumnCountPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (!dataGrid.IsHandlerSuspended(e.Property))
{
if ((int)e.NewValue < 0)
{
dataGrid.SetValueNoCallback(DataGrid.FrozenColumnCountProperty, e.OldValue);
throw DataGridError.DataGrid.ValueMustBeGreaterThanOrEqualTo("value", "FrozenColumnCount", 0);
}
ProcessFrozenColumnCount(dataGrid);
}
}
private static void ProcessFrozenColumnCount(DataGrid dataGrid)
{
dataGrid.CorrectColumnFrozenStates();
dataGrid.ComputeScrollBarsLayout();
dataGrid.InvalidateColumnHeadersArrange();
dataGrid.InvalidateCellsArrange();
}
/// <summary>
/// Gets or sets a value indicating which grid lines separating inner cells are shown.
/// </summary>
public DataGridGridLinesVisibility GridLinesVisibility
{
get { return (DataGridGridLinesVisibility)GetValue(GridLinesVisibilityProperty); }
set { SetValue(GridLinesVisibilityProperty, value); }
}
/// <summary>
/// Identifies the GridLinesVisibility dependency property.
/// </summary>
public static readonly DependencyProperty GridLinesVisibilityProperty =
DependencyProperty.Register(
"GridLinesVisibility",
typeof(DataGridGridLinesVisibility),
typeof(DataGrid),
new PropertyMetadata(DATAGRID_defaultGridLinesVisibility, OnGridLinesVisibilityPropertyChanged));
/// <summary>
/// GridLinesProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its GridLines.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnGridLinesVisibilityPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
foreach (DataGridRow row in dataGrid.GetAllRows())
{
row.EnsureGridLines();
row.InvalidateHorizontalArrange();
}
foreach (DataGridRowGroupHeader rowGroupHeader in dataGrid.GetAllRowGroupHeaders())
{
rowGroupHeader.EnsureGridLine();
}
}
/// <summary>
/// Gets or sets a value indicating the visibility of row and column headers.
/// </summary>
public DataGridHeadersVisibility HeadersVisibility
{
get { return (DataGridHeadersVisibility)GetValue(HeadersVisibilityProperty); }
set { SetValue(HeadersVisibilityProperty, value); }
}
/// <summary>
/// Identifies the HeadersVisibility dependency property.
/// </summary>
public static readonly DependencyProperty HeadersVisibilityProperty =
DependencyProperty.Register(
"HeadersVisibility",
typeof(DataGridHeadersVisibility),
typeof(DataGrid),
new PropertyMetadata(DATAGRID_defaultHeadersVisibility, OnHeadersVisibilityPropertyChanged));
/// <summary>
/// HeadersVisibilityProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its HeadersVisibility.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnHeadersVisibilityPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
DataGridHeadersVisibility newValue = (DataGridHeadersVisibility)e.NewValue;
DataGridHeadersVisibility oldValue = (DataGridHeadersVisibility)e.OldValue;
Func<DataGridHeadersVisibility, DataGridHeadersVisibility, bool> hasFlags = (DataGridHeadersVisibility value, DataGridHeadersVisibility flags) => ((value & flags) == flags);
bool newValueCols = hasFlags(newValue, DataGridHeadersVisibility.Column);
bool newValueRows = hasFlags(newValue, DataGridHeadersVisibility.Row);
bool oldValueCols = hasFlags(oldValue, DataGridHeadersVisibility.Column);
bool oldValueRows = hasFlags(oldValue, DataGridHeadersVisibility.Row);
// Columns
if (newValueCols != oldValueCols)
{
if (dataGrid._columnHeadersPresenter != null)
{
dataGrid.EnsureColumnHeadersVisibility();
if (!newValueCols)
{
dataGrid._columnHeadersPresenter.Measure(new Size(0.0, 0.0));
}
else
{
dataGrid.EnsureVerticalGridLines();
}
dataGrid.InvalidateMeasure();
}
}
// Rows
if (newValueRows != oldValueRows && dataGrid._rowsPresenter != null)
{
foreach (FrameworkElement element in dataGrid._rowsPresenter.Children)
{
DataGridRow row = element as DataGridRow;
if (row != null)
{
row.EnsureHeaderStyleAndVisibility(null);
if (newValueRows)
{
row.ApplyState(false /*animate*/);
row.EnsureHeaderVisibility();
}
}
else
{
DataGridRowGroupHeader rowGroupHeader = element as DataGridRowGroupHeader;
if (rowGroupHeader != null)
{
rowGroupHeader.EnsureHeaderStyleAndVisibility(null);
}
}
}
dataGrid.InvalidateRowHeightEstimate();
dataGrid.InvalidateRowsMeasure(true /*invalidateIndividualElements*/);
}
// TODO: This isn't necessary if the TopLeftCorner and the TopRightCorner Autosize to 0.
// See if their templates can be changed to do that.
if (dataGrid._topLeftCornerHeader != null)
{
dataGrid._topLeftCornerHeader.Visibility = (newValueRows && newValueCols) ? Visibility.Visible : Visibility.Collapsed;
if (dataGrid._topLeftCornerHeader.Visibility == Visibility.Collapsed)
{
dataGrid._topLeftCornerHeader.Measure(new Size(0.0, 0.0));
}
}
}
/// <summary>
/// Gets or sets the <see cref="T:System.Windows.Media.Brush"/> that is used to paint grid lines separating rows.
/// </summary>
public Brush HorizontalGridLinesBrush
{
get { return GetValue(HorizontalGridLinesBrushProperty) as Brush; }
set { SetValue(HorizontalGridLinesBrushProperty, value); }
}
/// <summary>
/// Identifies the HorizontalGridLinesBrush dependency property.
/// </summary>
public static readonly DependencyProperty HorizontalGridLinesBrushProperty =
DependencyProperty.Register(
"HorizontalGridLinesBrush",
typeof(Brush),
typeof(DataGrid),
new PropertyMetadata(null, OnHorizontalGridLinesBrushPropertyChanged));
/// <summary>
/// HorizontalGridLinesBrushProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its HorizontalGridLinesBrush.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnHorizontalGridLinesBrushPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (!dataGrid.IsHandlerSuspended(e.Property) && dataGrid._rowsPresenter != null)
{
foreach (DataGridRow row in dataGrid.GetAllRows())
{
row.EnsureGridLines();
}
foreach (DataGridRowGroupHeader rowGroupHeader in dataGrid.GetAllRowGroupHeaders())
{
rowGroupHeader.EnsureGridLine();
}
}
}
/// <summary>
/// Gets or sets a value indicating how the horizontal scroll bar is displayed.
/// </summary>
public ScrollBarVisibility HorizontalScrollBarVisibility
{
get { return (ScrollBarVisibility)GetValue(HorizontalScrollBarVisibilityProperty); }
set { SetValue(HorizontalScrollBarVisibilityProperty, value); }
}
/// <summary>
/// Identifies the HorizontalScrollBarVisibility dependency property.
/// </summary>
public static readonly DependencyProperty HorizontalScrollBarVisibilityProperty =
DependencyProperty.Register(
"HorizontalScrollBarVisibility",
typeof(ScrollBarVisibility),
typeof(DataGrid),
new PropertyMetadata(DATAGRID_defaultScrollBarVisibility, OnHorizontalScrollBarVisibilityPropertyChanged));
/// <summary>
/// HorizontalScrollBarVisibilityProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its HorizontalScrollBarVisibility.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnHorizontalScrollBarVisibilityPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (!dataGrid.IsHandlerSuspended(e.Property) && (ScrollBarVisibility)e.NewValue != (ScrollBarVisibility)e.OldValue)
{
dataGrid.UpdateRowsPresenterManipulationMode(true /*horizontalMode*/, false /*verticalMode*/);
if (dataGrid._hScrollBar != null)
{
if (dataGrid.IsHorizontalScrollBarOverCells)
{
dataGrid.ComputeScrollBarsLayout();
}
else
{
dataGrid.InvalidateMeasure();
}
}
}
}
/// <summary>
/// Gets or sets a value indicating whether the user can edit the values in the control.
/// </summary>
public bool IsReadOnly
{
get { return (bool)GetValue(IsReadOnlyProperty); }
set { SetValue(IsReadOnlyProperty, value); }
}
/// <summary>
/// Identifies the IsReadOnly dependency property.
/// </summary>
public static readonly DependencyProperty IsReadOnlyProperty =
DependencyProperty.Register(
"IsReadOnly",
typeof(bool),
typeof(DataGrid),
new PropertyMetadata(false, OnIsReadOnlyPropertyChanged));
/// <summary>
/// IsReadOnlyProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its IsReadOnly.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnIsReadOnlyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (!dataGrid.IsHandlerSuspended(e.Property))
{
bool value = (bool)e.NewValue;
if (value && !dataGrid.CommitEdit(DataGridEditingUnit.Row, true /*exitEditing*/))
{
dataGrid.CancelEdit(DataGridEditingUnit.Row, false /*raiseEvents*/);
}
#if FEATURE_IEDITABLECOLLECTIONVIEW
dataGrid.UpdateNewItemPlaceholder();
#endif
}
}
/// <summary>
/// Gets a value indicating whether data in the grid is valid.
/// </summary>
public bool IsValid
{
get
{
return (bool)GetValue(IsValidProperty);
}
internal set
{
if (value != this.IsValid)
{
if (value)
{
VisualStates.GoToState(this, true, VisualStates.StateValid);
}
else
{
VisualStates.GoToState(this, true, VisualStates.StateInvalid, VisualStates.StateValid);
}
this.SetValueNoCallback(DataGrid.IsValidProperty, value);
}
}
}
/// <summary>
/// Identifies the IsValid dependency property.
/// </summary>
public static readonly DependencyProperty IsValidProperty =
DependencyProperty.Register(
"IsValid",
typeof(bool),
typeof(DataGrid),
new PropertyMetadata(true, OnIsValidPropertyChanged));
/// <summary>
/// IsValidProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its IsValid.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnIsValidPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (!dataGrid.IsHandlerSuspended(e.Property))
{
dataGrid.SetValueNoCallback(DataGrid.IsValidProperty, e.OldValue);
throw DataGridError.DataGrid.UnderlyingPropertyIsReadOnly("IsValid");
}
}
/// <summary>
/// Gets or sets the threshold range that governs when the DataGrid class will begin to prefetch more items.
/// </summary>
/// <returns>
/// The loading threshold, in terms of pages.
/// </returns>
public double IncrementalLoadingThreshold
{
get { return (double)GetValue(IncrementalLoadingThresholdProperty); }
set { SetValue(IncrementalLoadingThresholdProperty, value); }
}
/// <summary>
/// Identifies the <see cref="IncrementalLoadingThreshold"/> dependency property
/// </summary>
public static readonly DependencyProperty IncrementalLoadingThresholdProperty =
DependencyProperty.Register(
nameof(IncrementalLoadingThreshold),
typeof(double),
typeof(DataGrid),
new PropertyMetadata(DATAGRID_defaultIncrementalLoadingThreshold, OnIncrementalLoadingThresholdPropertyChanged));
/// <summary>
/// IncrementalLoadingThresholdProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its IncrementalLoadingThreshold.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnIncrementalLoadingThresholdPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (!dataGrid.IsHandlerSuspended(e.Property))
{
double oldValue = (double)e.OldValue;
double newValue = (double)e.NewValue;
if (double.IsNaN(newValue))
{
dataGrid.SetValueNoCallback(e.Property, oldValue);
throw DataGridError.DataGrid.ValueCannotBeSetToNAN(nameof(dataGrid.IncrementalLoadingThreshold));
}
if (newValue < 0)
{
dataGrid.SetValueNoCallback(e.Property, oldValue);
throw DataGridError.DataGrid.ValueMustBeGreaterThanOrEqualTo("value", nameof(dataGrid.IncrementalLoadingThreshold), 0);
}
if (newValue > oldValue)
{
dataGrid.LoadMoreDataFromIncrementalItemsSource();
}
}
}
/// <summary>
/// Gets or sets a value that indicates the conditions for prefetch operations by the DataGrid class.
/// </summary>
/// <returns>
/// An enumeration value that indicates the conditions that trigger prefetch operations. The default is **Edge**.
/// </returns>
public IncrementalLoadingTrigger IncrementalLoadingTrigger
{
get { return (IncrementalLoadingTrigger)GetValue(IncrementalLoadingTriggerProperty); }
set { SetValue(IncrementalLoadingTriggerProperty, value); }
}
/// <summary>
/// Identifies the <see cref="IncrementalLoadingTrigger"/> dependency property
/// </summary>
public static readonly DependencyProperty IncrementalLoadingTriggerProperty =
DependencyProperty.Register(
nameof(IncrementalLoadingTrigger),
typeof(IncrementalLoadingTrigger),
typeof(DataGrid),
new PropertyMetadata(IncrementalLoadingTrigger.Edge));
/// <summary>
/// Gets or sets a collection that is used to generate the content of the control.
/// </summary>
public IEnumerable ItemsSource
{
get { return GetValue(ItemsSourceProperty) as IEnumerable; }
set { SetValue(ItemsSourceProperty, value); }
}
/// <summary>
/// Identifies the <see cref="ItemsSource"/> dependency property.
/// </summary>
public static readonly DependencyProperty ItemsSourceProperty =
DependencyProperty.Register(
"ItemsSource",
typeof(IEnumerable),
typeof(DataGrid),
new PropertyMetadata(null, OnItemsSourcePropertyChanged));
/// <summary>
/// ItemsSourceProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its ItemsSource.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnItemsSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (!dataGrid.IsHandlerSuspended(e.Property))
{
DiagnosticsDebug.Assert(dataGrid.DataConnection != null, "Expected non-null DataConnection.");
if (dataGrid.LoadingOrUnloadingRow)
{
dataGrid.SetValueNoCallback(DataGrid.ItemsSourceProperty, e.OldValue);
throw DataGridError.DataGrid.CannotChangeItemsWhenLoadingRows();
}
// Try to commit edit on the old DataSource, but force a cancel if it fails.
if (!dataGrid.CommitEdit())
{
dataGrid.CancelEdit(DataGridEditingUnit.Row, false);
}
dataGrid.DataConnection.UnWireEvents(dataGrid.DataConnection.DataSource);
dataGrid.DataConnection.ClearDataProperties();
dataGrid.ClearRowGroupHeadersTable();
// The old selected indexes are no longer relevant. There's a perf benefit from
// updating the selected indexes with a null DataSource, because we know that all
// of the previously selected indexes have been removed from selection.
dataGrid.DataConnection.DataSource = null;
dataGrid._selectedItems.UpdateIndexes();
dataGrid.CoerceSelectedItem();
// Wrap an IEnumerable in an ICollectionView if it's not already one.
bool setDefaultSelection = false;
IEnumerable newItemsSource = e.NewValue as IEnumerable;
if (newItemsSource != null && !(newItemsSource is ICollectionView))
{
dataGrid.DataConnection.DataSource = DataGridDataConnection.CreateView(newItemsSource);
}
else
{
dataGrid.DataConnection.DataSource = newItemsSource;
setDefaultSelection = true;
}
if (dataGrid.DataConnection.DataSource != null)
{
// Setup the column headers.
if (dataGrid.DataConnection.DataType != null)
{
foreach (DataGridBoundColumn boundColumn in dataGrid.ColumnsInternal.GetDisplayedColumns(column => column is DataGridBoundColumn))
{
boundColumn.SetHeaderFromBinding();
}
}
dataGrid.DataConnection.WireEvents(dataGrid.DataConnection.DataSource);
}
// Wait for the current cell to be set before we raise any SelectionChanged events.
dataGrid._makeFirstDisplayedCellCurrentCellPending = true;
// Clear out the old rows and remove the generated columns.
dataGrid.ClearRows(false /*recycle*/);
dataGrid.RemoveAutoGeneratedColumns();
// Set the SlotCount (from the data count and number of row group headers) before we make the default selection.
dataGrid.PopulateRowGroupHeadersTable();
dataGrid.RefreshSlotCounts();
dataGrid.SelectedItem = null;
if (dataGrid.DataConnection.CollectionView != null && setDefaultSelection)
{
dataGrid.SelectedItem = dataGrid.DataConnection.CollectionView.CurrentItem;
}
// Treat this like the DataGrid has never been measured because all calculations at
// this point are invalid until the next layout cycle. For instance, the ItemsSource
// can be set when the DataGrid is not part of the visual tree.
dataGrid._measured = false;
dataGrid.InvalidateMeasure();
}
}
/// <summary>
/// Gets or sets the maximum width of columns in the <see cref="DataGrid"/>.
/// </summary>
public double MaxColumnWidth
{
get { return (double)GetValue(MaxColumnWidthProperty); }
set { SetValue(MaxColumnWidthProperty, value); }
}
/// <summary>
/// Identifies the MaxColumnWidth dependency property.
/// </summary>
public static readonly DependencyProperty MaxColumnWidthProperty =
DependencyProperty.Register(
"MaxColumnWidth",
typeof(double),
typeof(DataGrid),
new PropertyMetadata(DATAGRID_defaultMaxColumnWidth, OnMaxColumnWidthPropertyChanged));
/// <summary>
/// MaxColumnWidthProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its ColumnWidth.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnMaxColumnWidthPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (!dataGrid.IsHandlerSuspended(e.Property))
{
double oldValue = (double)e.OldValue;
double newValue = (double)e.NewValue;
if (double.IsNaN(newValue))
{
dataGrid.SetValueNoCallback(e.Property, e.OldValue);
throw DataGridError.DataGrid.ValueCannotBeSetToNAN("MaxColumnWidth");
}
if (newValue < 0)
{
dataGrid.SetValueNoCallback(e.Property, e.OldValue);
throw DataGridError.DataGrid.ValueMustBeGreaterThanOrEqualTo("value", "MaxColumnWidth", 0);
}
if (dataGrid.MinColumnWidth > newValue)
{
dataGrid.SetValueNoCallback(e.Property, e.OldValue);
throw DataGridError.DataGrid.ValueMustBeGreaterThanOrEqualTo("value", "MaxColumnWidth", "MinColumnWidth");
}
foreach (DataGridColumn column in dataGrid.ColumnsInternal.GetDisplayedColumns())
{
dataGrid.OnColumnMaxWidthChanged(column, Math.Min(column.MaxWidth, oldValue));
}
}
}
/// <summary>
/// Gets or sets the minimum width of columns in the <see cref="DataGrid"/>.
/// </summary>
public double MinColumnWidth
{
get { return (double)GetValue(MinColumnWidthProperty); }
set { SetValue(MinColumnWidthProperty, value); }
}
/// <summary>
/// Identifies the MinColumnWidth dependency property.
/// </summary>
public static readonly DependencyProperty MinColumnWidthProperty =
DependencyProperty.Register(
"MinColumnWidth",
typeof(double),
typeof(DataGrid),
new PropertyMetadata(DATAGRID_defaultMinColumnWidth, OnMinColumnWidthPropertyChanged));
/// <summary>
/// MinColumnWidthProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its ColumnWidth.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnMinColumnWidthPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (!dataGrid.IsHandlerSuspended(e.Property))
{
double oldValue = (double)e.OldValue;
double newValue = (double)e.NewValue;
if (double.IsNaN(newValue))
{
dataGrid.SetValueNoCallback(e.Property, e.OldValue);
throw DataGridError.DataGrid.ValueCannotBeSetToNAN("MinColumnWidth");
}
if (newValue < 0)
{
dataGrid.SetValueNoCallback(e.Property, e.OldValue);
throw DataGridError.DataGrid.ValueMustBeGreaterThanOrEqualTo("value", "MinColumnWidth", 0);
}
if (double.IsPositiveInfinity(newValue))
{
dataGrid.SetValueNoCallback(e.Property, e.OldValue);
throw DataGridError.DataGrid.ValueCannotBeSetToInfinity("MinColumnWidth");
}
if (dataGrid.MaxColumnWidth < newValue)
{
dataGrid.SetValueNoCallback(e.Property, e.OldValue);
throw DataGridError.DataGrid.ValueMustBeLessThanOrEqualTo("value", "MinColumnWidth", "MaxColumnWidth");
}
foreach (DataGridColumn column in dataGrid.ColumnsInternal.GetDisplayedColumns())
{
dataGrid.OnColumnMinWidthChanged(column, Math.Max(column.MinWidth, oldValue));
}
}
}
/// <summary>
/// Gets or sets the <see cref="T:System.Windows.Media.Brush"/> that is used to paint row backgrounds.
/// </summary>
public Brush RowBackground
{
get { return GetValue(RowBackgroundProperty) as Brush; }
set { SetValue(RowBackgroundProperty, value); }
}
/// <summary>
/// Identifies the <see cref="RowBackground"/> dependency property.
/// </summary>
public static readonly DependencyProperty RowBackgroundProperty =
DependencyProperty.Register(
"RowBackground",
typeof(Brush),
typeof(DataGrid),
new PropertyMetadata(null, OnRowBackgroundPropertyChanged));
private static void OnRowBackgroundPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
// Go through the Displayed rows and update the background
foreach (DataGridRow row in dataGrid.GetAllRows())
{
row.EnsureBackground();
}
}
/// <summary>
/// Gets or sets the template that is used to display the content of the details section of rows.
/// </summary>
public DataTemplate RowDetailsTemplate
{
get { return GetValue(RowDetailsTemplateProperty) as DataTemplate; }
set { SetValue(RowDetailsTemplateProperty, value); }
}
/// <summary>
/// Identifies the RowDetailsTemplate dependency property.
/// </summary>
public static readonly DependencyProperty RowDetailsTemplateProperty =
DependencyProperty.Register(
"RowDetailsTemplate",
typeof(DataTemplate),
typeof(DataGrid),
new PropertyMetadata(null, OnRowDetailsTemplatePropertyChanged));
private static void OnRowDetailsTemplatePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
// Update the RowDetails templates if necessary
if (dataGrid._rowsPresenter != null)
{
foreach (DataGridRow row in dataGrid.GetAllRows())
{
if (dataGrid.GetRowDetailsVisibility(row.Index) == Visibility.Visible)
{
// DetailsPreferredHeight is initialized when the DetailsElement's size changes.
row.ApplyDetailsTemplate(false /*initializeDetailsPreferredHeight*/);
}
}
}
dataGrid.UpdateRowDetailsHeightEstimate();
dataGrid.InvalidateMeasure();
}
/// <summary>
/// Gets or sets a value indicating when the details sections of rows are displayed.
/// </summary>
public DataGridRowDetailsVisibilityMode RowDetailsVisibilityMode
{
get { return (DataGridRowDetailsVisibilityMode)GetValue(RowDetailsVisibilityModeProperty); }
set { SetValue(RowDetailsVisibilityModeProperty, value); }
}
/// <summary>
/// Identifies the RowDetailsVisibilityMode dependency property.
/// </summary>
public static readonly DependencyProperty RowDetailsVisibilityModeProperty =
DependencyProperty.Register(
"RowDetailsVisibilityMode",
typeof(DataGridRowDetailsVisibilityMode),
typeof(DataGrid),
new PropertyMetadata(DATAGRID_defaultRowDetailsVisibility, OnRowDetailsVisibilityModePropertyChanged));
/// <summary>
/// RowDetailsVisibilityModeProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its RowDetailsVisibilityMode.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnRowDetailsVisibilityModePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
dataGrid.UpdateRowDetailsVisibilityMode((DataGridRowDetailsVisibilityMode)e.NewValue);
}
/// <summary>
/// Gets or sets the <see cref="T:System.Windows.Media.Brush"/> that is used as the default cells foreground.
/// </summary>
public Brush RowForeground
{
get { return GetValue(RowForegroundProperty) as Brush; }
set { SetValue(RowForegroundProperty, value); }
}
/// <summary>
/// Identifies the <see cref="RowForeground"/> dependency property.
/// </summary>
public static readonly DependencyProperty RowForegroundProperty =
DependencyProperty.Register(
"RowForeground",
typeof(Brush),
typeof(DataGrid),
new PropertyMetadata(null, OnRowForegroundPropertyChanged));
private static void OnRowForegroundPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
// Go through the Displayed rows and update the foreground
foreach (DataGridRow row in dataGrid.GetAllRows())
{
row.EnsureForeground();
}
}
/// <summary>
/// Gets or sets the standard height of rows in the control.
/// </summary>
public double RowHeight
{
get { return (double)GetValue(RowHeightProperty); }
set { SetValue(RowHeightProperty, value); }
}
/// <summary>
/// Identifies the RowHeight dependency property.
/// </summary>
public static readonly DependencyProperty RowHeightProperty =
DependencyProperty.Register(
"RowHeight",
typeof(double),
typeof(DataGrid),
new PropertyMetadata(double.NaN, OnRowHeightPropertyChanged));
/// <summary>
/// RowHeightProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its RowHeight.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnRowHeightPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (!dataGrid.IsHandlerSuspended(e.Property))
{
double value = (double)e.NewValue;
if (value < DataGridRow.DATAGRIDROW_minimumHeight)
{
dataGrid.SetValueNoCallback(e.Property, e.OldValue);
throw DataGridError.DataGrid.ValueMustBeGreaterThanOrEqualTo("value", "RowHeight", 0);
}
if (value > DataGridRow.DATAGRIDROW_maximumHeight)
{
dataGrid.SetValueNoCallback(e.Property, e.OldValue);
throw DataGridError.DataGrid.ValueMustBeLessThanOrEqualTo("value", "RowHeight", DataGridRow.DATAGRIDROW_maximumHeight);
}
dataGrid.InvalidateRowHeightEstimate();
// Re-measure all the rows due to the Height change
dataGrid.InvalidateRowsMeasure(true);
// DataGrid needs to update the layout information and the ScrollBars
dataGrid.InvalidateMeasure();
}
}
/// <summary>
/// Gets or sets the width of the row header column.
/// </summary>
public double RowHeaderWidth
{
get { return (double)GetValue(RowHeaderWidthProperty); }
set { SetValue(RowHeaderWidthProperty, value); }
}
/// <summary>
/// Identifies the RowHeaderWidth dependency property.
/// </summary>
public static readonly DependencyProperty RowHeaderWidthProperty =
DependencyProperty.Register(
"RowHeaderWidth",
typeof(double),
typeof(DataGrid),
new PropertyMetadata(double.NaN, OnRowHeaderWidthPropertyChanged));
/// <summary>
/// RowHeaderWidthProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its RowHeaderWidth.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnRowHeaderWidthPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (!dataGrid.IsHandlerSuspended(e.Property))
{
double value = (double)e.NewValue;
if (value < DATAGRID_minimumRowHeaderWidth)
{
dataGrid.SetValueNoCallback(e.Property, e.OldValue);
throw DataGridError.DataGrid.ValueMustBeGreaterThanOrEqualTo("value", "RowHeaderWidth", DATAGRID_minimumRowHeaderWidth);
}
if (value > DATAGRID_maxHeadersThickness)
{
dataGrid.SetValueNoCallback(e.Property, e.OldValue);
throw DataGridError.DataGrid.ValueMustBeLessThanOrEqualTo("value", "RowHeaderWidth", DATAGRID_maxHeadersThickness);
}
dataGrid.EnsureRowHeaderWidth();
}
}
/// <summary>
/// Gets or sets the style that is used when rendering the row headers.
/// </summary>
public Style RowHeaderStyle
{
get { return GetValue(RowHeaderStyleProperty) as Style; }
set { SetValue(RowHeaderStyleProperty, value); }
}
/// <summary>
/// Identifies the <see cref="RowHeaderStyle"/> dependency property.
/// </summary>
public static readonly DependencyProperty RowHeaderStyleProperty =
DependencyProperty.Register(
"RowHeaderStyle",
typeof(Style),
typeof(DataGrid),
new PropertyMetadata(null, OnRowHeaderStylePropertyChanged));
private static void OnRowHeaderStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (dataGrid != null && dataGrid._rowsPresenter != null)
{
// Set HeaderStyle for displayed rows
Style previousStyle = e.OldValue as Style;
foreach (UIElement element in dataGrid._rowsPresenter.Children)
{
DataGridRow row = element as DataGridRow;
if (row != null)
{
row.EnsureHeaderStyleAndVisibility(previousStyle);
}
else
{
DataGridRowGroupHeader groupHeader = element as DataGridRowGroupHeader;
if (groupHeader != null)
{
groupHeader.EnsureHeaderStyleAndVisibility(previousStyle);
}
}
}
dataGrid.InvalidateRowHeightEstimate();
}
}
/// <summary>
/// Gets or sets the style that is used when rendering the rows.
/// </summary>
public Style RowStyle
{
get { return GetValue(RowStyleProperty) as Style; }
set { SetValue(RowStyleProperty, value); }
}
/// <summary>
/// Identifies the <see cref="RowStyle"/> dependency property.
/// </summary>
public static readonly DependencyProperty RowStyleProperty =
DependencyProperty.Register(
"RowStyle",
typeof(Style),
typeof(DataGrid),
new PropertyMetadata(null, OnRowStylePropertyChanged));
private static void OnRowStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (dataGrid != null)
{
if (dataGrid._rowsPresenter != null)
{
// Set the style for displayed rows if it has not already been set
foreach (DataGridRow row in dataGrid.GetAllRows())
{
EnsureElementStyle(row, e.OldValue as Style, e.NewValue as Style);
}
}
dataGrid.InvalidateRowHeightEstimate();
}
}
/// <summary>
/// Gets or sets the selection behavior of the data grid.
/// </summary>
public DataGridSelectionMode SelectionMode
{
get { return (DataGridSelectionMode)GetValue(SelectionModeProperty); }
set { SetValue(SelectionModeProperty, value); }
}
/// <summary>
/// Identifies the SelectionMode dependency property.
/// </summary>
public static readonly DependencyProperty SelectionModeProperty =
DependencyProperty.Register(
"SelectionMode",
typeof(DataGridSelectionMode),
typeof(DataGrid),
new PropertyMetadata(DATAGRID_defaultSelectionMode, OnSelectionModePropertyChanged));
/// <summary>
/// SelectionModeProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its SelectionMode.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnSelectionModePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (!dataGrid.IsHandlerSuspended(e.Property))
{
dataGrid.ClearRowSelection(true /*resetAnchorSlot*/);
}
}
/// <summary>
/// Gets or sets the index of the current selection.
/// </summary>
/// <returns>The index of the current selection, or -1 if the selection is empty.</returns>
public int SelectedIndex
{
get { return (int)GetValue(SelectedIndexProperty); }
set { SetValue(SelectedIndexProperty, value); }
}
/// <summary>
/// Identifies the SelectedIndex dependency property.
/// </summary>
public static readonly DependencyProperty SelectedIndexProperty =
DependencyProperty.Register(
"SelectedIndex",
typeof(int),
typeof(DataGrid),
new PropertyMetadata(-1, OnSelectedIndexPropertyChanged));
/// <summary>
/// SelectedIndexProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its SelectedIndex.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnSelectedIndexPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (!dataGrid.IsHandlerSuspended(e.Property))
{
int index = (int)e.NewValue;
// GetDataItem returns null if index is >= Count, we do not check newValue
// against Count here to avoid enumerating through an Enumerable twice
// Setting SelectedItem coerces the finally value of the SelectedIndex
object newSelectedItem = (index < 0) ? null : dataGrid.DataConnection.GetDataItem(index);
dataGrid.SelectedItem = newSelectedItem;
if (dataGrid.SelectedItem != newSelectedItem)
{
d.SetValueNoCallback(e.Property, e.OldValue);
}
}
}
/// <summary>
/// Gets or sets the data item corresponding to the selected row.
/// </summary>
public object SelectedItem
{
get { return GetValue(SelectedItemProperty) as object; }
set { SetValue(SelectedItemProperty, value); }
}
/// <summary>
/// Identifies the SelectedItem dependency property.
/// </summary>
public static readonly DependencyProperty SelectedItemProperty =
DependencyProperty.Register(
"SelectedItem",
typeof(object),
typeof(DataGrid),
new PropertyMetadata(null, OnSelectedItemPropertyChanged));
/// <summary>
/// SelectedItemProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its SelectedItem.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnSelectedItemPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (!dataGrid.IsHandlerSuspended(e.Property))
{
int rowIndex = (e.NewValue == null) ? -1 : dataGrid.DataConnection.IndexOf(e.NewValue);
if (rowIndex == -1)
{
// If the Item is null or it's not found, clear the Selection
if (!dataGrid.CommitEdit(DataGridEditingUnit.Row, true /*exitEditing*/))
{
// Edited value couldn't be committed or aborted
d.SetValueNoCallback(e.Property, e.OldValue);
return;
}
// Clear all row selections
dataGrid.ClearRowSelection(true /*resetAnchorSlot*/);
}
else
{
int slot = dataGrid.SlotFromRowIndex(rowIndex);
if (slot != dataGrid.CurrentSlot)
{
if (!dataGrid.CommitEdit(DataGridEditingUnit.Row, true /*exitEditing*/))
{
// Edited value couldn't be committed or aborted
d.SetValueNoCallback(e.Property, e.OldValue);
return;
}
if (slot >= dataGrid.SlotCount || slot < -1)
{
if (dataGrid.DataConnection.CollectionView != null)
{
dataGrid.DataConnection.CollectionView.MoveCurrentToPosition(rowIndex);
}
}
}
int oldSelectedIndex = dataGrid.SelectedIndex;
if (oldSelectedIndex != rowIndex)
{
dataGrid.SetValueNoCallback(DataGrid.SelectedIndexProperty, rowIndex);
}
try
{
dataGrid._noSelectionChangeCount++;
int columnIndex = dataGrid.CurrentColumnIndex;
if (columnIndex == -1)
{
columnIndex = dataGrid.FirstDisplayedNonFillerColumnIndex;
}
if (dataGrid.IsSlotOutOfSelectionBounds(slot))
{
dataGrid.ClearRowSelection(slot /*slotException*/, true /*resetAnchorSlot*/);
return;
}
dataGrid.UpdateSelectionAndCurrency(columnIndex, slot, DataGridSelectionAction.SelectCurrent, false /*scrollIntoView*/);
}
finally
{
dataGrid.NoSelectionChangeCount--;
}
if (!dataGrid._successfullyUpdatedSelection)
{
dataGrid.SetValueNoCallback(DataGrid.SelectedIndexProperty, oldSelectedIndex);
d.SetValueNoCallback(e.Property, e.OldValue);
}
}
}
}
/// <summary>
/// Gets or sets the <see cref="T:System.Windows.Media.Brush"/> that is used to paint grid lines separating columns.
/// </summary>
public Brush VerticalGridLinesBrush
{
get { return GetValue(VerticalGridLinesBrushProperty) as Brush; }
set { SetValue(VerticalGridLinesBrushProperty, value); }
}
/// <summary>
/// Identifies the VerticalGridLinesBrush dependency property.
/// </summary>
public static readonly DependencyProperty VerticalGridLinesBrushProperty =
DependencyProperty.Register(
"VerticalGridLinesBrush",
typeof(Brush),
typeof(DataGrid),
new PropertyMetadata(null, OnVerticalGridLinesBrushPropertyChanged));
/// <summary>
/// VerticalGridLinesBrushProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its VerticalGridLinesBrush.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnVerticalGridLinesBrushPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (dataGrid._rowsPresenter != null)
{
foreach (DataGridRow row in dataGrid.GetAllRows())
{
row.EnsureGridLines();
}
}
}
/// <summary>
/// Gets or sets a value indicating how the vertical scroll bar is displayed.
/// </summary>
public ScrollBarVisibility VerticalScrollBarVisibility
{
get { return (ScrollBarVisibility)GetValue(VerticalScrollBarVisibilityProperty); }
set { SetValue(VerticalScrollBarVisibilityProperty, value); }
}
/// <summary>
/// Identifies the VerticalScrollBarVisibility dependency property.
/// </summary>
public static readonly DependencyProperty VerticalScrollBarVisibilityProperty =
DependencyProperty.Register(
"VerticalScrollBarVisibility",
typeof(ScrollBarVisibility),
typeof(DataGrid),
new PropertyMetadata(DATAGRID_defaultScrollBarVisibility, OnVerticalScrollBarVisibilityPropertyChanged));
/// <summary>
/// VerticalScrollBarVisibilityProperty property changed handler.
/// </summary>
/// <param name="d">DataGrid that changed its VerticalScrollBarVisibility.</param>
/// <param name="e">DependencyPropertyChangedEventArgs.</param>
private static void OnVerticalScrollBarVisibilityPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
DataGrid dataGrid = d as DataGrid;
if (!dataGrid.IsHandlerSuspended(e.Property) && (ScrollBarVisibility)e.NewValue != (ScrollBarVisibility)e.OldValue)
{
dataGrid.UpdateRowsPresenterManipulationMode(false /*horizontalMode*/, true /*verticalMode*/);
if (dataGrid._vScrollBar != null)
{
if (dataGrid.IsVerticalScrollBarOverCells)
{
dataGrid.ComputeScrollBarsLayout();
}
else
{
dataGrid.InvalidateMeasure();
}
}
}
}
/// <summary>
/// Gets a collection that contains all the columns in the control.
/// </summary>
public ObservableCollection<DataGridColumn> Columns
{
get
{
// we use a backing field here because the field's type
// is a subclass of the property's
return this.ColumnsInternal;
}
}
/// <summary>
/// Gets or sets the column that contains the current cell.
/// </summary>
public DataGridColumn CurrentColumn
{
get
{
if (this.CurrentColumnIndex == -1)
{
return null;
}
DiagnosticsDebug.Assert(this.CurrentColumnIndex < this.ColumnsItemsInternal.Count, "Expected CurrentColumnIndex smaller than ColumnsItemsInternal.Count.");
return this.ColumnsItemsInternal[this.CurrentColumnIndex];
}
set
{
DataGridColumn dataGridColumn = value;
if (dataGridColumn == null)
{
throw DataGridError.DataGrid.ValueCannotBeSetToNull("value", "CurrentColumn");
}
if (this.CurrentColumn != dataGridColumn)
{
if (dataGridColumn.OwningGrid != this)
{
// Provided column does not belong to this DataGrid
throw DataGridError.DataGrid.ColumnNotInThisDataGrid();
}
if (dataGridColumn.Visibility == Visibility.Collapsed)
{
// CurrentColumn cannot be set to an invisible column
throw DataGridError.DataGrid.ColumnCannotBeCollapsed();
}
if (this.CurrentSlot == -1)
{
// There is no current row so the current column cannot be set
throw DataGridError.DataGrid.NoCurrentRow();
}
bool beginEdit = _editingColumnIndex != -1;
if (!EndCellEdit(DataGridEditAction.Commit, true /*exitEditingMode*/, this.ContainsFocus /*keepFocus*/, true /*raiseEvents*/))
{
// Edited value couldn't be committed or aborted
return;
}
if (_noFocusedColumnChangeCount == 0)
{
this.ColumnHeaderHasFocus = false;
}
this.UpdateSelectionAndCurrency(dataGridColumn.Index, this.CurrentSlot, DataGridSelectionAction.None, false /*scrollIntoView*/);
DiagnosticsDebug.Assert(_successfullyUpdatedSelection, "Expected _successfullyUpdatedSelection is true.");
if (beginEdit &&
_editingColumnIndex == -1 &&
this.CurrentSlot != -1 &&
this.CurrentColumnIndex != -1 &&
this.CurrentColumnIndex == dataGridColumn.Index &&
dataGridColumn.OwningGrid == this &&
!GetColumnEffectiveReadOnlyState(dataGridColumn))
{
// Returning to editing mode since the grid was in that mode prior to the EndCellEdit call above.
BeginCellEdit(new RoutedEventArgs());
}
}
}
}
/// <summary>
/// Gets or sets the label to display in a DataGridRowGroupHeader when its PropertyName is not set.
/// </summary>
public string RowGroupHeaderPropertyNameAlternative
{
get
{
return _rowGroupHeaderPropertyNameAlternative;
}
set
{
_rowGroupHeaderPropertyNameAlternative = value;
}
}
/// <summary>
/// Gets the style that is used when rendering the row group header.
/// </summary>
public ObservableCollection<Style> RowGroupHeaderStyles
{
get
{
return _rowGroupHeaderStyles;
}
}
/// <summary>
/// Gets a list that contains the data items corresponding to the selected rows.
/// </summary>
public IList SelectedItems
{
get { return _selectedItems as IList; }
}
/// <summary>
/// Gets the data item bound to the row that contains the current cell.
/// </summary>
protected object CurrentItem
{
get
{
if (this.CurrentSlot == -1 ||
this.RowGroupHeadersTable.Contains(this.CurrentSlot) ||
this.ItemsSource /*this.DataConnection.DataSource*/ == null)
{
return null;
}
return this.DataConnection.GetDataItem(RowIndexFromSlot(this.CurrentSlot));
}
}
internal static double HorizontalGridLinesThickness
{
get
{
return DATAGRID_horizontalGridLinesThickness;
}
}
internal int AnchorSlot
{
get;
private set;
}
internal double ActualRowHeaderWidth
{
get
{
if (!this.AreRowHeadersVisible)
{
return 0;
}
else
{
return !double.IsNaN(this.RowHeaderWidth) ? this.RowHeaderWidth : this.RowHeadersDesiredWidth;
}
}
}
internal double ActualRowsPresenterHeight
{
get
{
if (_rowsPresenter != null)
{
return _rowsPresenter.ActualHeight;
}
return 0;
}
}
internal bool AllowsManipulation
{
get
{
return _rowsPresenter != null &&
(_rowsPresenter.ManipulationMode & (ManipulationModes.TranslateX | ManipulationModes.TranslateY)) != ManipulationModes.None;
}
}
internal bool AreColumnHeadersVisible
{
get
{
return (this.HeadersVisibility & DataGridHeadersVisibility.Column) == DataGridHeadersVisibility.Column;
}
}
internal bool AreRowHeadersVisible
{
get
{
return (this.HeadersVisibility & DataGridHeadersVisibility.Row) == DataGridHeadersVisibility.Row;
}
}
/// <summary>
/// Gets or sets a value indicating whether or not at least one auto-sizing column is waiting for all the rows
/// to be measured before its final width is determined.
/// </summary>
internal bool AutoSizingColumns
{
get
{
return _autoSizingColumns;
}
set
{
if (_autoSizingColumns && value == false && this.ColumnsInternal != null)
{
double adjustment = this.CellsWidth - this.ColumnsInternal.VisibleEdgedColumnsWidth;
this.AdjustColumnWidths(0, adjustment, false);
foreach (DataGridColumn column in this.ColumnsInternal.GetVisibleColumns())
{
column.IsInitialDesiredWidthDetermined = true;
}
this.ColumnsInternal.EnsureVisibleEdgedColumnsWidth();
this.ComputeScrollBarsLayout();
InvalidateColumnHeadersMeasure();
InvalidateRowsMeasure(true);
}
_autoSizingColumns = value;
}
}
internal double AvailableSlotElementRoom
{
get;
set;
}
// Height currently available for cells this value is smaller. This height is reduced by the existence of ColumnHeaders
// or a horizontal scrollbar. Layout is asynchronous so changes to the ColumnHeaders or the horizontal scrollbar are
// not reflected immediately.
internal double CellsHeight
{
get
{
return this.RowsPresenterAvailableSize.HasValue ? this.RowsPresenterAvailableSize.Value.Height : 0;
}
}
// Width currently available for cells this value is smaller. This width is reduced by the existence of RowHeaders
// or a vertical scrollbar. Layout is asynchronous so changes to the RowHeaders or the vertical scrollbar are
// not reflected immediately
internal double CellsWidth
{
get
{
double rowsWidth = double.PositiveInfinity;
if (this.RowsPresenterAvailableSize.HasValue)
{
rowsWidth = Math.Max(0, this.RowsPresenterAvailableSize.Value.Width - this.ActualRowHeaderWidth);
}
return double.IsPositiveInfinity(rowsWidth) ? this.ColumnsInternal.VisibleEdgedColumnsWidth : rowsWidth;
}
}
/// <summary>
/// Gets an empty content control that's used during the DataGrid's copy procedure
/// to determine the value of a ClipboardContentBinding for a particular column and item.
/// </summary>
internal ContentControl ClipboardContentControl
{
get
{
if (_clipboardContentControl == null)
{
_clipboardContentControl = new ContentControl();
}
return _clipboardContentControl;
}
}
internal bool ColumnHeaderHasFocus
{
get
{
return _columnHeaderHasFocus;
}
set
{
DiagnosticsDebug.Assert(!value || (this.ColumnHeaders != null && this.AreColumnHeadersVisible), "Expected value==False || (non-null ColumnHeaders and AreColumnHeadersVisible==True)");
if (_columnHeaderHasFocus != value)
{
_columnHeaderHasFocus = value;
if (this.CurrentColumn != null && this.IsSlotVisible(this.CurrentSlot))
{
UpdateCurrentState(this.DisplayData.GetDisplayedElement(this.CurrentSlot), this.CurrentColumnIndex, true /*applyCellState*/);
}
DataGridColumn oldFocusedColumn = this.FocusedColumn;
this.FocusedColumn = null;
if (_columnHeaderHasFocus)
{
this.FocusedColumn = this.CurrentColumn == null ? this.ColumnsInternal.FirstVisibleNonFillerColumn : this.CurrentColumn;
}
if (oldFocusedColumn != null && oldFocusedColumn.HasHeaderCell)
{
oldFocusedColumn.HeaderCell.ApplyState(true);
}
if (this.FocusedColumn != null && this.FocusedColumn.HasHeaderCell)
{
this.FocusedColumn.HeaderCell.ApplyState(true);
ScrollColumnIntoView(this.FocusedColumn.Index);
}
}
}
}
internal DataGridColumnHeaderInteractionInfo ColumnHeaderInteractionInfo
{
get;
set;
}
internal DataGridColumnHeadersPresenter ColumnHeaders
{
get
{
return _columnHeadersPresenter;
}
}
internal DataGridColumnCollection ColumnsInternal
{
get;
private set;
}
internal List<DataGridColumn> ColumnsItemsInternal
{
get
{
return this.ColumnsInternal.ItemsInternal;
}
}
internal bool ContainsFocus
{
get;
private set;
}
internal int CurrentColumnIndex
{
get
{
return this.CurrentCellCoordinates.ColumnIndex;
}
private set
{
this.CurrentCellCoordinates.ColumnIndex = value;
}
}
internal int CurrentSlot
{
get
{
return this.CurrentCellCoordinates.Slot;
}
private set
{
this.CurrentCellCoordinates.Slot = value;
}
}
internal DataGridDataConnection DataConnection
{
get;
private set;
}
internal DataGridDisplayData DisplayData
{
get;
private set;
}
internal int EditingColumnIndex
{
get
{
return _editingColumnIndex;
}
}
internal DataGridRow EditingRow
{
get;
private set;
}
internal double FirstDisplayedScrollingColumnHiddenWidth
{
get
{
return _negHorizontalOffset;
}
}
internal DataGridColumn FocusedColumn
{
get;
set;
}
internal bool HasColumnUserInteraction
{
get
{
return this.ColumnHeaderInteractionInfo.HasUserInteraction;
}
}
// When the RowsPresenter's width increases, the HorizontalOffset will be incorrect until
// the scrollbar's layout is recalculated, which doesn't occur until after the cells are measured.
// This property exists to account for this scenario, and avoid collapsing the incorrect cells.
internal double HorizontalAdjustment
{
get;
private set;
}
// the sum of the widths in pixels of the scrolling columns preceding
// the first displayed scrolling column
internal double HorizontalOffset
{
get
{
return _horizontalOffset;
}
set
{
if (value < 0)
{
value = 0;
}
double widthNotVisible = Math.Max(0, this.ColumnsInternal.VisibleEdgedColumnsWidth - this.CellsWidth);
if (value > widthNotVisible)
{
value = widthNotVisible;
}
if (value == _horizontalOffset)
{
return;
}
SetHorizontalOffset(value);
_horizontalOffset = value;
this.DisplayData.FirstDisplayedScrollingCol = ComputeFirstVisibleScrollingColumn();
// update the lastTotallyDisplayedScrollingCol
ComputeDisplayedColumns();
}
}
internal ScrollBar HorizontalScrollBar
{
get
{
return _hScrollBar;
}
}
internal bool LoadingOrUnloadingRow
{
get;
private set;
}
internal bool InDisplayIndexAdjustments
{
get;
set;
}
internal double NegVerticalOffset
{
get;
private set;
}
internal int NoCurrentCellChangeCount
{
get
{
return _noCurrentCellChangeCount;
}
set
{
DiagnosticsDebug.Assert(value >= 0, "Expected positive NoCurrentCellChangeCount.");
_noCurrentCellChangeCount = value;
if (value == 0)
{
FlushCurrentCellChanged();
}
}
}
internal double RowDetailsHeightEstimate
{
get;
private set;
}
internal double RowHeadersDesiredWidth
{
get
{
return _rowHeaderDesiredWidth;
}
set
{
// We only auto grow
if (_rowHeaderDesiredWidth < value)
{
double oldActualRowHeaderWidth = this.ActualRowHeaderWidth;
_rowHeaderDesiredWidth = value;
if (oldActualRowHeaderWidth != this.ActualRowHeaderWidth)
{
bool invalidated = EnsureRowHeaderWidth();
// If we didn't invalidate in Ensure and we have star columns, force the column widths to be recomputed here.
if (!invalidated && this.ColumnsInternal.VisibleStarColumnCount > 0)
{
this.ColumnsInternal.EnsureVisibleEdgedColumnsWidth();
InvalidateMeasure();
}
}
}
}
}
internal double RowGroupHeaderHeightEstimate
{
get;
private set;
}
internal IndexToValueTable<DataGridRowGroupInfo> RowGroupHeadersTable
{
get;
private set;
}
internal double[] RowGroupSublevelIndents
{
get;
private set;
}
internal double RowHeightEstimate
{
get;
private set;
}
internal Size? RowsPresenterAvailableSize
{
get
{
return _rowsPresenterAvailableSize;
}
set
{
if (_rowsPresenterAvailableSize.HasValue && value.HasValue && value.Value.Width > this.RowsPresenterAvailableSize.Value.Width)
{
// When the available cells width increases, the horizontal offset can be incorrect.
// Store away an adjustment to use during the CellsPresenter's measure, so that the
// ShouldDisplayCell method correctly determines if a cell will be in view.
//
// | h. offset | new available cells width |
// |-------------->|----------------------------------------->|
// __________________________________________________ |
// | | | | | |
// | column0 | column1 | column2 | column3 |<----->|
// | | | | | adj. |
double adjustment = (_horizontalOffset + value.Value.Width) - this.ColumnsInternal.VisibleEdgedColumnsWidth;
this.HorizontalAdjustment = Math.Min(this.HorizontalOffset, Math.Max(0, adjustment));
}
else
{
this.HorizontalAdjustment = 0;
}
bool loadMoreDataFromIncrementalItemsSource = _rowsPresenterAvailableSize.HasValue && value.HasValue && value.Value.Height > _rowsPresenterAvailableSize.Value.Height;
_rowsPresenterAvailableSize = value;
if (loadMoreDataFromIncrementalItemsSource)
{
LoadMoreDataFromIncrementalItemsSource();
}
}
}
// This flag indicates whether selection has actually changed during a selection operation,
// and exists to ensure that FlushSelectionChanged doesn't unnecessarily raise SelectionChanged.
internal bool SelectionHasChanged
{
get;
set;
}
internal int SlotCount
{
get;
private set;
}
internal bool UpdatedStateOnTapped
{
get;
set;
}
/// <summary>
/// Gets a value indicating whether or not to use star-sizing logic. If the DataGrid has infinite available space,
/// then star sizing doesn't make sense. In this case, all star columns grow to a predefined size of
/// 10,000 pixels in order to show the developer that star columns shouldn't be used.
/// </summary>
internal bool UsesStarSizing
{
get
{
if (this.ColumnsInternal != null)
{
return this.ColumnsInternal.VisibleStarColumnCount > 0 &&
(!this.RowsPresenterAvailableSize.HasValue || !double.IsPositiveInfinity(this.RowsPresenterAvailableSize.Value.Width));
}
return false;
}
}
internal double VerticalOffset
{
get
{
return _verticalOffset;
}
set
{
bool loadMoreDataFromIncrementalItemsSource = _verticalOffset < value;
_verticalOffset = value;
if (loadMoreDataFromIncrementalItemsSource)
{
LoadMoreDataFromIncrementalItemsSource();
}
}
}
internal ScrollBar VerticalScrollBar
{
get
{
return _vScrollBar;
}
}
internal int VisibleSlotCount
{
get;
set;
}
private bool AreAllScrollBarsCollapsed
{
get
{
return (_hScrollBar == null || _hScrollBar.Visibility == Visibility.Collapsed) &&
(_vScrollBar == null || _vScrollBar.Visibility == Visibility.Collapsed);
}
}
private bool AreBothScrollBarsVisible
{
get
{
return _hScrollBar != null && _hScrollBar.Visibility == Visibility.Visible &&
_vScrollBar != null && _vScrollBar.Visibility == Visibility.Visible;
}
}
private DataGridCellCoordinates CurrentCellCoordinates
{
get
{
return _currentCellCoordinates;
}
set
{
_currentCellCoordinates = value;
}
}
private int FirstDisplayedNonFillerColumnIndex
{
get
{
DataGridColumn column = this.ColumnsInternal.FirstVisibleNonFillerColumn;
if (column != null)
{
if (column.IsFrozen)
{
return column.Index;
}
else
{
if (this.DisplayData.FirstDisplayedScrollingCol >= column.Index)
{
return this.DisplayData.FirstDisplayedScrollingCol;
}
else
{
return column.Index;
}
}
}
return -1;
}
}
private bool IsHorizontalScrollBarInteracting
{
get
{
return _isHorizontalScrollBarInteracting;
}
set
{
if (_isHorizontalScrollBarInteracting != value)
{
_isHorizontalScrollBarInteracting = value;
if (_hScrollBar != null)
{
if (_isHorizontalScrollBarInteracting)
{
// Prevent the vertical scroll bar from fading out while the user is interacting with the horizontal one.
_keepScrollBarsShowing = true;
ShowScrollBars();
}
else
{
// Make the scroll bars fade out, after the normal delay.
_keepScrollBarsShowing = false;
HideScrollBars(true /*useTransitions*/);
}
}
}
}
}
private bool IsHorizontalScrollBarOverCells
{
get
{
return _columnHeadersPresenter != null && Grid.GetColumnSpan(_columnHeadersPresenter) == 2;
}
}
private bool IsVerticalScrollBarInteracting
{
get
{
return _isVerticalScrollBarInteracting;
}
set
{
if (_isVerticalScrollBarInteracting != value)
{
_isVerticalScrollBarInteracting = value;
if (_vScrollBar != null)
{
if (_isVerticalScrollBarInteracting)
{
// Prevent the horizontal scroll bar from fading out while the user is interacting with the vertical one.
_keepScrollBarsShowing = true;
ShowScrollBars();
}
else
{
// Make the scroll bars fade out, after the normal delay.
_keepScrollBarsShowing = false;
HideScrollBars(true /*useTransitions*/);
}
}
}
}
}
private bool IsVerticalScrollBarOverCells
{
get
{
return _rowsPresenter != null && Grid.GetRowSpan(_rowsPresenter) == 2;
}
}
private VirtualKey LastHandledKeyDown
{
get;
set;
}
private int NoSelectionChangeCount
{
get
{
return _noSelectionChangeCount;
}
set
{
DiagnosticsDebug.Assert(value >= 0, "Expected positive NoSelectionChangeCount.");
_noSelectionChangeCount = value;
if (value == 0)
{
FlushSelectionChanged();
}
}
}
/// <summary>
/// Enters editing mode for the current cell and current row (if they're not already in editing mode).
/// </summary>
/// <returns>True if operation was successful. False otherwise.</returns>
public bool BeginEdit()
{
return BeginEdit(null);
}
/// <summary>
/// Enters editing mode for the current cell and current row (if they're not already in editing mode).
/// </summary>
/// <param name="editingEventArgs">Provides information about the user gesture that caused the call to BeginEdit. Can be null.</param>
/// <returns>True if operation was successful. False otherwise.</returns>
public bool BeginEdit(RoutedEventArgs editingEventArgs)
{
if (this.CurrentColumnIndex == -1 || !GetRowSelection(this.CurrentSlot))
{
return false;
}
DiagnosticsDebug.Assert(this.CurrentColumnIndex >= 0, "Expected positive CurrentColumnIndex.");
DiagnosticsDebug.Assert(this.CurrentColumnIndex < this.ColumnsItemsInternal.Count, "Expected CurrentColumnIndex smaller than ColumnsItemsInternal.Count.");
DiagnosticsDebug.Assert(this.CurrentSlot >= -1, "Expected CurrentSlot greater than or equal to -1.");
DiagnosticsDebug.Assert(this.CurrentSlot < this.SlotCount, "Expected CurrentSlot smaller than SlotCount.");
DiagnosticsDebug.Assert(this.EditingRow == null || this.EditingRow.Slot == this.CurrentSlot, "Expected null EditingRow or EditingRow.Slot equal to CurrentSlot.");
if (GetColumnEffectiveReadOnlyState(this.CurrentColumn))
{
// Current column is read-only
return false;
}
return BeginCellEdit(editingEventArgs);
}
/// <summary>
/// Cancels editing mode and restores the original value.
/// </summary>
/// <returns>True if operation was successful. False otherwise.</returns>
public bool CancelEdit()
{
return CancelEdit(DataGridEditingUnit.Row);
}
/// <summary>
/// Cancels editing mode for the specified DataGridEditingUnit and restores its original value.
/// </summary>
/// <param name="editingUnit">Specifies whether to cancel edit for a Cell or Row.</param>
/// <returns>True if operation was successful. False otherwise.</returns>
public bool CancelEdit(DataGridEditingUnit editingUnit)
{
return this.CancelEdit(editingUnit, true /*raiseEvents*/);
}
/// <summary>
/// Commits editing mode and pushes changes to the backend.
/// </summary>
/// <returns>True if operation was successful. False otherwise.</returns>
public bool CommitEdit()
{
return CommitEdit(DataGridEditingUnit.Row, true);
}
/// <summary>
/// Commits editing mode for the specified DataGridEditingUnit and pushes changes to the backend.
/// </summary>
/// <param name="editingUnit">Specifies whether to commit edit for a Cell or Row.</param>
/// <param name="exitEditingMode">Editing mode is left if True.</param>
/// <returns>True if operation was successful. False otherwise.</returns>
public bool CommitEdit(DataGridEditingUnit editingUnit, bool exitEditingMode)
{
if (!EndCellEdit(DataGridEditAction.Commit, editingUnit == DataGridEditingUnit.Cell ? exitEditingMode : true, this.ContainsFocus /*keepFocus*/, true /*raiseEvents*/))
{
return false;
}
if (editingUnit == DataGridEditingUnit.Row)
{
return EndRowEdit(DataGridEditAction.Commit, exitEditingMode, true /*raiseEvents*/);
}
return true;
}
/// <summary>
/// Returns the Group at the indicated level or null if the item is not in the ItemsSource
/// </summary>
/// <param name="item">item</param>
/// <param name="groupLevel">groupLevel</param>
/// <returns>The group the given item falls under or null if the item is not in the ItemsSource</returns>
public ICollectionViewGroup GetGroupFromItem(object item, int groupLevel)
{
int itemIndex = this.DataConnection.IndexOf(item);
if (itemIndex == -1)
{
return null;
}
int groupHeaderSlot = this.RowGroupHeadersTable.GetPreviousIndex(SlotFromRowIndex(itemIndex));
DataGridRowGroupInfo rowGroupInfo = this.RowGroupHeadersTable.GetValueAt(groupHeaderSlot);
while (rowGroupInfo != null && rowGroupInfo.Level != groupLevel)
{
groupHeaderSlot = this.RowGroupHeadersTable.GetPreviousIndex(rowGroupInfo.Slot);
rowGroupInfo = this.RowGroupHeadersTable.GetValueAt(groupHeaderSlot);
}
return rowGroupInfo == null ? null : rowGroupInfo.CollectionViewGroup;
}
/// <summary>
/// Scrolls the specified item or RowGroupHeader and/or column into view.
/// If item is not null: scrolls the row representing the item into view;
/// If column is not null: scrolls the column into view;
/// If both item and column are null, the method returns without scrolling.
/// </summary>
/// <param name="item">an item from the DataGrid's items source or a CollectionViewGroup from the collection view</param>
/// <param name="column">a column from the DataGrid's columns collection</param>
public void ScrollIntoView(object item, DataGridColumn column)
{
if ((column == null && (item == null || this.FirstDisplayedNonFillerColumnIndex == -1)) ||
(column != null && column.OwningGrid != this))
{
// no-op
return;
}
if (item == null)
{
// scroll column into view
this.ScrollSlotIntoView(column.Index, this.DisplayData.FirstScrollingSlot, false /*forCurrentCellChange*/, true /*forceHorizontalScroll*/);
}
else
{
int slot;
DataGridRowGroupInfo rowGroupInfo = null;
ICollectionViewGroup collectionViewGroup = item as ICollectionViewGroup;
if (collectionViewGroup != null)
{
rowGroupInfo = RowGroupInfoFromCollectionViewGroup(collectionViewGroup);
if (rowGroupInfo == null)
{
Debug.Fail("Expected non-null rowGroupInfo.");
return;
}
slot = rowGroupInfo.Slot;
}
else
{
// the row index will be set to -1 if the item is null or not in the list
int rowIndex = this.DataConnection.IndexOf(item);
if (rowIndex == -1 || (this.IsReadOnly && rowIndex == this.DataConnection.NewItemPlaceholderIndex))
{
return;
}
slot = SlotFromRowIndex(rowIndex);
}
int columnIndex = (column == null) ? this.FirstDisplayedNonFillerColumnIndex : column.Index;
if (_collapsedSlotsTable.Contains(slot))
{
// We need to expand all parent RowGroups so that the slot is visible
if (rowGroupInfo != null)
{
ExpandRowGroupParentChain(rowGroupInfo.Level - 1, rowGroupInfo.Slot);
}
else
{
rowGroupInfo = this.RowGroupHeadersTable.GetValueAt(this.RowGroupHeadersTable.GetPreviousIndex(slot));
DiagnosticsDebug.Assert(rowGroupInfo != null, "Expected non-null rowGroupInfo.");
if (rowGroupInfo != null)
{
ExpandRowGroupParentChain(rowGroupInfo.Level, rowGroupInfo.Slot);
}
}
// Update ScrollBar and display information
this.NegVerticalOffset = 0;
SetVerticalOffset(0);
ResetDisplayedRows();
this.DisplayData.FirstScrollingSlot = 0;
ComputeScrollBarsLayout();
}
ScrollSlotIntoView(columnIndex, slot, true /*forCurrentCellChange*/, true /*forceHorizontalScroll*/);
}
}
/// <summary>
/// Arranges the content of the <see cref="DataGridRow"/>.
/// </summary>
/// <param name="finalSize">
/// The final area within the parent that this element should use to arrange itself and its children.
/// </param>
/// <returns>
/// The actual size used by the <see cref="DataGridRow"/>.
/// </returns>
protected override Size ArrangeOverride(Size finalSize)
{
if (_makeFirstDisplayedCellCurrentCellPending)
{
MakeFirstDisplayedCellCurrentCell();
}
if (this.ActualWidth != finalSize.Width)
{
// If our final width has changed, we might need to update the filler
InvalidateColumnHeadersArrange();
InvalidateCellsArrange();
}
return base.ArrangeOverride(finalSize);
}
/// <summary>
/// Measures the children of a <see cref="DataGridRow"/> to prepare for
/// arranging them during the
/// <see cref="M:System.Windows.Controls.DataGridRow.ArrangeOverride(System.Windows.Size)"/> pass.
/// </summary>
/// <returns>
/// The size that the <see cref="DataGridRow"/> determines it needs during layout, based on its calculations of child object allocated sizes.
/// </returns>
/// <param name="availableSize">
/// The available size that this element can give to child elements. Indicates an upper limit that
/// child elements should not exceed.
/// </param>
protected override Size MeasureOverride(Size availableSize)
{
// Delay layout until after the initial measure to avoid invalid calculations when the
// DataGrid is not part of the visual tree
if (!_measured)
{
_measured = true;
// We don't need to clear the rows because it was already done when the ItemsSource changed
RefreshRowsAndColumns(false /*clearRows*/);
// Update our estimates now that the DataGrid has all of the information necessary
UpdateRowDetailsHeightEstimate();
// Update frozen columns to account for columns added prior to loading or auto-generated columns
if (this.FrozenColumnCountWithFiller > 0)
{
ProcessFrozenColumnCount(this);
}
}
Size desiredSize;
// This is a shortcut to skip layout if we don't have any columns
if (this.ColumnsInternal.Count == 0)
{
if (_hScrollBar != null && _hScrollBar.Visibility != Visibility.Collapsed)
{
_hScrollBar.Visibility = Visibility.Collapsed;
}
if (_vScrollBar != null && _vScrollBar.Visibility != Visibility.Collapsed)
{
_vScrollBar.Visibility = Visibility.Collapsed;
}
desiredSize = base.MeasureOverride(availableSize);
}
else
{
if (_rowsPresenter != null)
{
_rowsPresenter.InvalidateMeasure();
}
InvalidateColumnHeadersMeasure();
desiredSize = base.MeasureOverride(availableSize);
ComputeScrollBarsLayout();
}
return desiredSize;
}
/// <summary>
/// Comparator class so we can sort list by the display index
/// </summary>
public class DisplayIndexComparer : IComparer<DataGridColumn>
{
// Calls CaseInsensitiveComparer.Compare with the parameters reversed.
int IComparer<DataGridColumn>.Compare(DataGridColumn x, DataGridColumn y)
{
return (x.DisplayIndexWithFiller < y.DisplayIndexWithFiller) ? -1 : 1;
}
}
/// <summary>
/// Builds the visual tree for the column header when a new template is applied.
/// </summary>
protected override void OnApplyTemplate()
{
// The template has changed, so we need to refresh the visuals
_measured = false;
_hasNoIndicatorStateStoryboardCompletedHandler = false;
_keepScrollBarsShowing = false;
if (_columnHeadersPresenter != null)
{
// If we're applying a new template, we want to remove the old column headers first
_columnHeadersPresenter.Children.Clear();
}
_columnHeadersPresenter = GetTemplateChild(DATAGRID_elementColumnHeadersPresenterName) as DataGridColumnHeadersPresenter;
if (_columnHeadersPresenter != null)
{
if (this.ColumnsInternal.FillerColumn != null)
{
this.ColumnsInternal.FillerColumn.IsRepresented = false;
}
_columnHeadersPresenter.OwningGrid = this;
// Columns were added before our Template was applied, add the ColumnHeaders now
List<DataGridColumn> sortedInternal = new List<DataGridColumn>(this.ColumnsItemsInternal);
sortedInternal.Sort(new DisplayIndexComparer());
foreach (DataGridColumn column in sortedInternal)
{
InsertDisplayedColumnHeader(column);
}
}
if (_rowsPresenter != null)
{
// If we're applying a new template, we want to remove the old rows first
this.UnloadElements(false /*recycle*/);
}
_rowsPresenter = GetTemplateChild(DATAGRID_elementRowsPresenterName) as DataGridRowsPresenter;
if (_rowsPresenter != null)
{
_rowsPresenter.OwningGrid = this;
InvalidateRowHeightEstimate();
UpdateRowDetailsHeightEstimate();
UpdateRowsPresenterManipulationMode(true /*horizontalMode*/, true /*verticalMode*/);
}
_frozenColumnScrollBarSpacer = GetTemplateChild(DATAGRID_elementFrozenColumnScrollBarSpacerName) as FrameworkElement;
if (_hScrollBar != null)
{
_isHorizontalScrollBarInteracting = false;
_isPointerOverHorizontalScrollBar = false;
UnhookHorizontalScrollBarEvents();
}
_hScrollBar = GetTemplateChild(DATAGRID_elementHorizontalScrollBarName) as ScrollBar;
if (_hScrollBar != null)
{
_hScrollBar.IsTabStop = false;
_hScrollBar.Maximum = 0.0;
_hScrollBar.Orientation = Orientation.Horizontal;
_hScrollBar.Visibility = Visibility.Collapsed;
HookHorizontalScrollBarEvents();
}
if (_vScrollBar != null)
{
_isVerticalScrollBarInteracting = false;
_isPointerOverVerticalScrollBar = false;
UnhookVerticalScrollBarEvents();
}
_vScrollBar = GetTemplateChild(DATAGRID_elementVerticalScrollBarName) as ScrollBar;
if (_vScrollBar != null)
{
_vScrollBar.IsTabStop = false;
_vScrollBar.Maximum = 0.0;
_vScrollBar.Orientation = Orientation.Vertical;
_vScrollBar.Visibility = Visibility.Collapsed;
HookVerticalScrollBarEvents();
}
_topLeftCornerHeader = GetTemplateChild(DATAGRID_elementTopLeftCornerHeaderName) as ContentControl;
EnsureTopLeftCornerHeader(); // EnsureTopLeftCornerHeader checks for a null _topLeftCornerHeader;
_topRightCornerHeader = GetTemplateChild(DATAGRID_elementTopRightCornerHeaderName) as ContentControl;
_bottomRightCorner = GetTemplateChild(DATAGRID_elementBottomRightCornerHeaderName) as UIElement;
#if FEATURE_VALIDATION_SUMMARY
if (_validationSummary != null)
{
_validationSummary.FocusingInvalidControl -= new EventHandler<FocusingInvalidControlEventArgs>(ValidationSummary_FocusingInvalidControl);
_validationSummary.SelectionChanged -= new EventHandler<SelectionChangedEventArgs>(ValidationSummary_SelectionChanged);
}
_validationSummary = GetTemplateChild(DATAGRID_elementValidationSummary) as ValidationSummary;
if (_validationSummary != null)
{
// The ValidationSummary defaults to using its parent if Target is null, so the only
// way to prevent it from automatically picking up errors is to set it to some useless element.
if (_validationSummary.Target == null)
{
_validationSummary.Target = new Rectangle();
}
_validationSummary.FocusingInvalidControl += new EventHandler<FocusingInvalidControlEventArgs>(ValidationSummary_FocusingInvalidControl);
_validationSummary.SelectionChanged += new EventHandler<SelectionChangedEventArgs>(ValidationSummary_SelectionChanged);
if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
{
DiagnosticsDebug.Assert(_validationSummary.Errors != null);
// Do not add the default design time errors when in design mode.
_validationSummary.Errors.Clear();
}
}
#endif
FrameworkElement root = GetTemplateChild(DATAGRID_elementRootName) as FrameworkElement;
if (root != null)
{
IList<VisualStateGroup> rootVisualStateGroups = VisualStateManager.GetVisualStateGroups(root);
if (rootVisualStateGroups != null)
{
int groupCount = rootVisualStateGroups.Count;
for (int groupIndex = 0; groupIndex < groupCount; groupIndex++)
{
VisualStateGroup group = rootVisualStateGroups[groupIndex];
if (group != null)
{
IList<VisualState> visualStates = group.States;
if (visualStates != null)
{
int stateCount = visualStates.Count;
for (int stateIndex = 0; stateIndex < stateCount; stateIndex++)
{
VisualState state = visualStates[stateIndex];
if (state != null)
{
string stateName = state.Name;
Storyboard stateStoryboard = state.Storyboard;
if (stateStoryboard != null)
{
if (stateName == VisualStates.StateNoIndicator)
{
stateStoryboard.Completed += NoIndicatorStateStoryboard_Completed;
_hasNoIndicatorStateStoryboardCompletedHandler = true;
}
else if (stateName == VisualStates.StateTouchIndicator || stateName == VisualStates.StateMouseIndicator || stateName == VisualStates.StateMouseIndicatorFull)
{
stateStoryboard.Completed += IndicatorStateStoryboard_Completed;
}
}
}
}
}
}
}
}
}
HideScrollBars(false /*useTransitions*/);
UpdateDisabledVisual();
}
/// <summary>
/// Raises the AutoGeneratingColumn event.
/// </summary>
protected virtual void OnAutoGeneratingColumn(DataGridAutoGeneratingColumnEventArgs e)
{
EventHandler<DataGridAutoGeneratingColumnEventArgs> handler = this.AutoGeneratingColumn;
if (handler != null)
{
handler(this, e);
}
}
/// <summary>
/// Raises the BeginningEdit event.
/// </summary>
protected virtual void OnBeginningEdit(DataGridBeginningEditEventArgs e)
{
EventHandler<DataGridBeginningEditEventArgs> handler = this.BeginningEdit;
if (handler != null)
{
handler(this, e);
}
}
/// <summary>
/// Raises the CellEditEnded event.
/// </summary>
protected virtual void OnCellEditEnded(DataGridCellEditEndedEventArgs e)
{
EventHandler<DataGridCellEditEndedEventArgs> handler = this.CellEditEnded;
if (handler != null)
{
handler(this, e);
}
// Raise the automation invoke event for the cell that just ended edit
DataGridAutomationPeer peer = DataGridAutomationPeer.FromElement(this) as DataGridAutomationPeer;
if (peer != null && AutomationPeer.ListenerExists(AutomationEvents.InvokePatternOnInvoked))
{
peer.RaiseAutomationInvokeEvents(DataGridEditingUnit.Cell, e.Column, e.Row);
}
}
/// <summary>
/// Raises the CellEditEnding event.
/// </summary>
protected virtual void OnCellEditEnding(DataGridCellEditEndingEventArgs e)
{
EventHandler<DataGridCellEditEndingEventArgs> handler = this.CellEditEnding;
if (handler != null)
{
handler(this, e);
}
}
/// <summary>
/// This method raises the CopyingRowClipboardContent event.
/// </summary>
/// <param name="e">Contains the necessary information for generating the row clipboard content.</param>
protected virtual void OnCopyingRowClipboardContent(DataGridRowClipboardEventArgs e)
{
EventHandler<DataGridRowClipboardEventArgs> handler = this.CopyingRowClipboardContent;
if (handler != null)
{
handler(this, e);
}
}
/// <summary>
/// Creates AutomationPeer (<see cref="UIElement.OnCreateAutomationPeer"/>)
/// </summary>
/// <returns>An automation peer for this <see cref="DataGrid"/>.</returns>
protected override AutomationPeer OnCreateAutomationPeer()
{
return new DataGridAutomationPeer(this);
}
/// <summary>
/// Raises the CurrentCellChanged event.
/// </summary>
protected virtual void OnCurrentCellChanged(EventArgs e)
{
EventHandler<EventArgs> handler = this.CurrentCellChanged;
if (handler != null)
{
handler(this, e);
}
if (AutomationPeer.ListenerExists(AutomationEvents.SelectionItemPatternOnElementSelected))
{
DataGridAutomationPeer peer = DataGridAutomationPeer.FromElement(this) as DataGridAutomationPeer;
if (peer != null)
{
peer.RaiseAutomationCellSelectedEvent(this.CurrentSlot, this.CurrentColumnIndex);
}
}
}
/// <summary>
/// Raises the LoadingRow event for row preparation.
/// </summary>
protected virtual void OnLoadingRow(DataGridRowEventArgs e)
{
EventHandler<DataGridRowEventArgs> handler = this.LoadingRow;
if (handler != null)
{
DiagnosticsDebug.Assert(!_loadedRows.Contains(e.Row), "Expected e.Rows not contained in _loadedRows.");
_loadedRows.Add(e.Row);
this.LoadingOrUnloadingRow = true;
try
{
handler(this, e);
}
finally
{
this.LoadingOrUnloadingRow = false;
DiagnosticsDebug.Assert(_loadedRows.Contains(e.Row), "Expected e.Rows contained in _loadedRows.");
_loadedRows.Remove(e.Row);
}
}
}
/// <summary>
/// Raises the LoadingRowGroup event
/// </summary>
/// <param name="e">EventArgs</param>
protected virtual void OnLoadingRowGroup(DataGridRowGroupHeaderEventArgs e)
{
EventHandler<DataGridRowGroupHeaderEventArgs> handler = this.LoadingRowGroup;
if (handler != null)
{
this.LoadingOrUnloadingRow = true;
try
{
handler(this, e);
}
finally
{
this.LoadingOrUnloadingRow = false;
}
}
}
/// <summary>
/// Raises the LoadingRowDetails for row details preparation
/// </summary>
protected virtual void OnLoadingRowDetails(DataGridRowDetailsEventArgs e)
{
EventHandler<DataGridRowDetailsEventArgs> handler = this.LoadingRowDetails;
if (handler != null)
{
this.LoadingOrUnloadingRow = true;
try
{
handler(this, e);
}
finally
{
this.LoadingOrUnloadingRow = false;
}
}
}
/// <summary>
/// Scrolls the DataGrid according to the direction of the delta.
/// </summary>
/// <param name="e">PointerRoutedEventArgs</param>
protected override void OnPointerWheelChanged(PointerRoutedEventArgs e)
{
base.OnPointerWheelChanged(e);
if (!e.Handled)
{
PointerPoint pointerPoint = e.GetCurrentPoint(this);
// A horizontal scroll happens if the mouse has a horizontal wheel OR if the horizontal scrollbar is not disabled AND the vertical scrollbar IS disabled
bool isForHorizontalScroll = pointerPoint.Properties.IsHorizontalMouseWheel ||
(this.HorizontalScrollBarVisibility != ScrollBarVisibility.Disabled && this.VerticalScrollBarVisibility == ScrollBarVisibility.Disabled);
if ((isForHorizontalScroll && this.HorizontalScrollBarVisibility == ScrollBarVisibility.Disabled) ||
(!isForHorizontalScroll && this.VerticalScrollBarVisibility == ScrollBarVisibility.Disabled))
{
return;
}
double offsetDelta = -pointerPoint.Properties.MouseWheelDelta / DATAGRID_mouseWheelDeltaDivider;
if (isForHorizontalScroll && pointerPoint.Properties.IsHorizontalMouseWheel)
{
offsetDelta *= -1.0;
}
e.Handled = ProcessScrollOffsetDelta(offsetDelta, isForHorizontalScroll);
}
}
/// <summary>
/// Raises the PreparingCellForEdit event.
/// </summary>
protected virtual void OnPreparingCellForEdit(DataGridPreparingCellForEditEventArgs e)
{
EventHandler<DataGridPreparingCellForEditEventArgs> handler = this.PreparingCellForEdit;
if (handler != null)
{
handler(this, e);
}
// Raise the automation invoke event for the cell that just began edit because now
// its editable content has been loaded
DataGridAutomationPeer peer = DataGridAutomationPeer.FromElement(this) as DataGridAutomationPeer;
if (peer != null && AutomationPeer.ListenerExists(AutomationEvents.InvokePatternOnInvoked))
{
peer.RaiseAutomationInvokeEvents(DataGridEditingUnit.Cell, e.Column, e.Row);
}
}
/// <summary>
/// Raises the RowEditEnded event.
/// </summary>
protected virtual void OnRowEditEnded(DataGridRowEditEndedEventArgs e)
{
EventHandler<DataGridRowEditEndedEventArgs> handler = this.RowEditEnded;
if (handler != null)
{
handler(this, e);
}
// Raise the automation invoke event for the row that just ended edit because the edits
// to its associated item have either been committed or reverted
DataGridAutomationPeer peer = DataGridAutomationPeer.FromElement(this) as DataGridAutomationPeer;
if (peer != null && AutomationPeer.ListenerExists(AutomationEvents.InvokePatternOnInvoked))
{
peer.RaiseAutomationInvokeEvents(DataGridEditingUnit.Row, null, e.Row);
}
}
/// <summary>
/// Raises the RowEditEnding event.
/// </summary>
protected virtual void OnRowEditEnding(DataGridRowEditEndingEventArgs e)
{
EventHandler<DataGridRowEditEndingEventArgs> handler = this.RowEditEnding;
if (handler != null)
{
handler(this, e);
}
}
/// <summary>
/// Raises the SelectionChanged event and clears the _selectionChanged.
/// This event won't get raised again until after _selectionChanged is set back to true.
/// </summary>
protected virtual void OnSelectionChanged(SelectionChangedEventArgs e)
{
SelectionChangedEventHandler handler = this.SelectionChanged;
if (handler != null)
{
handler(this, e);
}
if (AutomationPeer.ListenerExists(AutomationEvents.SelectionItemPatternOnElementSelected) ||
AutomationPeer.ListenerExists(AutomationEvents.SelectionItemPatternOnElementAddedToSelection) ||
AutomationPeer.ListenerExists(AutomationEvents.SelectionItemPatternOnElementRemovedFromSelection))
{
DataGridAutomationPeer peer = DataGridAutomationPeer.FromElement(this) as DataGridAutomationPeer;
if (peer != null)
{
peer.RaiseAutomationSelectionEvents(e);
}
}
}
/// <summary>
/// Raises the UnloadingRow event for row recycling.
/// </summary>
protected virtual void OnUnloadingRow(DataGridRowEventArgs e)
{
EventHandler<DataGridRowEventArgs> handler = this.UnloadingRow;
if (handler != null)
{
this.LoadingOrUnloadingRow = true;
try
{
handler(this, e);
}
finally
{
this.LoadingOrUnloadingRow = false;
}
}
}
/// <summary>
/// Raises the UnloadingRowDetails event
/// </summary>
protected virtual void OnUnloadingRowDetails(DataGridRowDetailsEventArgs e)
{
EventHandler<DataGridRowDetailsEventArgs> handler = this.UnloadingRowDetails;
if (handler != null)
{
this.LoadingOrUnloadingRow = true;
try
{
handler(this, e);
}
finally
{
this.LoadingOrUnloadingRow = false;
}
}
}
/// <summary>
/// Raises the UnloadingRowGroup event
/// </summary>
/// <param name="e">EventArgs</param>
protected virtual void OnUnloadingRowGroup(DataGridRowGroupHeaderEventArgs e)
{
EventHandler<DataGridRowGroupHeaderEventArgs> handler = this.UnloadingRowGroup;
if (handler != null)
{
this.LoadingOrUnloadingRow = true;
try
{
handler(this, e);
}
finally
{
this.LoadingOrUnloadingRow = false;
}
}
}
internal static DataGridCell GetOwningCell(FrameworkElement element)
{
DiagnosticsDebug.Assert(element != null, "Expected non-null element.");
DataGridCell cell = element as DataGridCell;
while (element != null && cell == null)
{
element = element.Parent as FrameworkElement;
cell = element as DataGridCell;
}
return cell;
}
/// <summary>
/// Cancels editing mode for the specified DataGridEditingUnit and restores its original value.
/// </summary>
/// <param name="editingUnit">Specifies whether to cancel edit for a Cell or Row.</param>
/// <param name="raiseEvents">Specifies whether or not to raise editing events</param>
/// <returns>True if operation was successful. False otherwise.</returns>
internal bool CancelEdit(DataGridEditingUnit editingUnit, bool raiseEvents)
{
if (!EndCellEdit(DataGridEditAction.Cancel, true, this.ContainsFocus /*keepFocus*/, raiseEvents))
{
return false;
}
if (editingUnit == DataGridEditingUnit.Row)
{
return EndRowEdit(DataGridEditAction.Cancel, true, raiseEvents);
}
return true;
}
/// <summary>
/// call when: selection changes or SelectedItems object changes
/// </summary>
internal void CoerceSelectedItem()
{
object selectedItem = null;
if (this.SelectionMode == DataGridSelectionMode.Extended &&
this.CurrentSlot != -1 &&
_selectedItems.ContainsSlot(this.CurrentSlot))
{
selectedItem = this.CurrentItem;
}
else if (_selectedItems.Count > 0)
{
selectedItem = _selectedItems[0];
}
if (this.SelectedItem != selectedItem)
{
this.SetValueNoCallback(DataGrid.SelectedItemProperty, selectedItem);
}
// Update the SelectedIndex
int newIndex = -1;
if (selectedItem != null)
{
newIndex = this.DataConnection.IndexOf(selectedItem);
}
if (this.SelectedIndex != newIndex)
{
this.SetValueNoCallback(DataGrid.SelectedIndexProperty, newIndex);
}
}
internal IEnumerable<object> GetSelectionInclusive(int startRowIndex, int endRowIndex)
{
int endSlot = SlotFromRowIndex(endRowIndex);
foreach (int slot in _selectedItems.GetSlots(SlotFromRowIndex(startRowIndex)))
{
if (slot > endSlot)
{
break;
}
yield return this.DataConnection.GetDataItem(RowIndexFromSlot(slot));
}
}
internal void InitializeElements(bool recycleRows)
{
try
{
_noCurrentCellChangeCount++;
// The underlying collection has changed and our editing row (if there is one)
// is no longer relevant, so we should force a cancel edit.
CancelEdit(DataGridEditingUnit.Row, false /*raiseEvents*/);
// We want to persist selection throughout a reset, so store away the selected items
List<object> selectedItemsCache = new List<object>(_selectedItems.SelectedItemsCache);
if (recycleRows)
{
RefreshRows(recycleRows /*recycleRows*/, true /*clearRows*/);
}
else
{
RefreshRowsAndColumns(true /*clearRows*/);
}
// Re-select the old items
_selectedItems.SelectedItemsCache = selectedItemsCache;
CoerceSelectedItem();
if (this.RowDetailsVisibilityMode != DataGridRowDetailsVisibilityMode.Collapsed)
{
UpdateRowDetailsVisibilityMode(this.RowDetailsVisibilityMode);
}
// The currently displayed rows may have incorrect visual states because of the selection change
ApplyDisplayedRowsState(this.DisplayData.FirstScrollingSlot, this.DisplayData.LastScrollingSlot);
}
finally
{
this.NoCurrentCellChangeCount--;
}
}
// Returns the item or the CollectionViewGroup that is used as the DataContext for a given slot.
// If the DataContext is an item, rowIndex is set to the index of the item within the collection.
internal object ItemFromSlot(int slot, ref int rowIndex)
{
if (this.RowGroupHeadersTable.Contains(slot))
{
DataGridRowGroupInfo groupInfo = this.RowGroupHeadersTable.GetValueAt(slot);
if (groupInfo != null)
{
return groupInfo.CollectionViewGroup;
}
}
else
{
rowIndex = RowIndexFromSlot(slot);
return this.DataConnection.GetDataItem(rowIndex);
}
return null;
}
internal void LoadMoreDataFromIncrementalItemsSource()
{
LoadMoreDataFromIncrementalItemsSource(totalVisibleHeight: EdgedRowsHeightCalculated);
}
internal void OnRowDetailsChanged()
{
if (!_scrollingByHeight)
{
// Update layout when RowDetails are expanded or collapsed, just updating the vertical scroll bar is not enough
// since rows could be added or removed.
InvalidateMeasure();
}
}
internal void OnUserSorting()
{
_isUserSorting = true;
}
internal void OnUserSorted()
{
_isUserSorting = false;
}
internal bool ProcessDownKey()
{
bool shift, ctrl;
KeyboardHelper.GetMetaKeyState(out ctrl, out shift);
return ProcessDownKeyInternal(shift, ctrl);
}
internal bool ProcessEndKey()
{
bool ctrl;
bool shift;
KeyboardHelper.GetMetaKeyState(out ctrl, out shift);
return this.ProcessEndKey(shift, ctrl);
}
internal bool ProcessEnterKey()
{
bool ctrl, shift;
KeyboardHelper.GetMetaKeyState(out ctrl, out shift);
return this.ProcessEnterKey(shift, ctrl);
}
internal bool ProcessHomeKey()
{
bool ctrl;
bool shift;
KeyboardHelper.GetMetaKeyState(out ctrl, out shift);
return this.ProcessHomeKey(shift, ctrl);
}
internal void ProcessHorizontalScroll(ScrollEventType scrollEventType)
{
if (scrollEventType == ScrollEventType.EndScroll)
{
this.IsHorizontalScrollBarInteracting = false;
}
else if (scrollEventType == ScrollEventType.ThumbTrack)
{
this.IsHorizontalScrollBarInteracting = true;
}
if (_horizontalScrollChangesIgnored > 0)
{
return;
}
// If the user scrolls with the buttons, we need to update the new value of the scroll bar since we delay
// this calculation. If they scroll in another other way, the scroll bar's correct value has already been set
double scrollBarValueDifference = 0;
if (scrollEventType == ScrollEventType.SmallIncrement)
{
scrollBarValueDifference = GetHorizontalSmallScrollIncrease();
}
else if (scrollEventType == ScrollEventType.SmallDecrement)
{
scrollBarValueDifference = -GetHorizontalSmallScrollDecrease();
}
_horizontalScrollChangesIgnored++;
try
{
if (scrollBarValueDifference != 0)
{
DiagnosticsDebug.Assert(_horizontalOffset + scrollBarValueDifference >= 0, "Expected positive _horizontalOffset + scrollBarValueDifference.");
SetHorizontalOffset(_horizontalOffset + scrollBarValueDifference);
}
UpdateHorizontalOffset(_hScrollBar.Value);
}
finally
{
_horizontalScrollChangesIgnored--;
}
DataGridAutomationPeer peer = DataGridAutomationPeer.FromElement(this) as DataGridAutomationPeer;
if (peer != null)
{
peer.RaiseAutomationScrollEvents();
}
}
internal bool ProcessLeftKey()
{
bool ctrl;
bool shift;
KeyboardHelper.GetMetaKeyState(out ctrl, out shift);
return this.ProcessLeftKey(shift, ctrl);
}
internal bool ProcessNextKey()
{
bool ctrl;
bool shift;
KeyboardHelper.GetMetaKeyState(out ctrl, out shift);
return this.ProcessNextKey(shift, ctrl);
}
internal bool ProcessPriorKey()
{
bool ctrl;
bool shift;
KeyboardHelper.GetMetaKeyState(out ctrl, out shift);
return this.ProcessPriorKey(shift, ctrl);
}
internal bool ProcessRightKey()
{
bool ctrl;
bool shift;
KeyboardHelper.GetMetaKeyState(out ctrl, out shift);
return this.ProcessRightKey(shift, ctrl);
}
internal bool ProcessScrollOffsetDelta(double offsetDelta, bool isForHorizontalScroll)
{
if (this.IsEnabled && this.DisplayData.NumDisplayedScrollingElements > 0)
{
if (isForHorizontalScroll)
{
double newHorizontalOffset = this.HorizontalOffset + offsetDelta;
if (newHorizontalOffset < 0)
{
newHorizontalOffset = 0;
}
double maxHorizontalOffset = Math.Max(0, this.ColumnsInternal.VisibleEdgedColumnsWidth - this.CellsWidth);
if (newHorizontalOffset > maxHorizontalOffset)
{
newHorizontalOffset = maxHorizontalOffset;
}
if (newHorizontalOffset != this.HorizontalOffset)
{
UpdateHorizontalOffset(newHorizontalOffset);
return true;
}
}
else
{
if (offsetDelta < 0)
{
offsetDelta = Math.Max(-_verticalOffset, offsetDelta);
}
else if (offsetDelta > 0)
{
if (_vScrollBar != null && this.VerticalScrollBarVisibility == ScrollBarVisibility.Visible)
{
offsetDelta = Math.Min(Math.Max(0, _vScrollBar.Maximum - _verticalOffset), offsetDelta);
}
else
{
double maximum = this.EdgedRowsHeightCalculated - this.CellsHeight;
offsetDelta = Math.Min(Math.Max(0, maximum - _verticalOffset), offsetDelta);
}
}
if (offsetDelta != 0)
{
this.DisplayData.PendingVerticalScrollHeight = offsetDelta;
InvalidateRowsMeasure(false /*invalidateIndividualRows*/);
return true;
}
}
}
return false;
}
/// <summary>
/// Selects items and updates currency based on parameters
/// </summary>
/// <param name="columnIndex">column index to make current</param>
/// <param name="item">data item or CollectionViewGroup to make current</param>
/// <param name="backupSlot">slot to use in case the item is no longer valid</param>
/// <param name="action">selection action to perform</param>
/// <param name="scrollIntoView">whether or not the new current item should be scrolled into view</param>
internal void ProcessSelectionAndCurrency(int columnIndex, object item, int backupSlot, DataGridSelectionAction action, bool scrollIntoView)
{
_noSelectionChangeCount++;
_noCurrentCellChangeCount++;
try
{
int slot = -1;
ICollectionViewGroup group = item as ICollectionViewGroup;
if (group != null)
{
DataGridRowGroupInfo groupInfo = this.RowGroupInfoFromCollectionViewGroup(group);
if (groupInfo != null)
{
slot = groupInfo.Slot;
}
}
else
{
slot = this.SlotFromRowIndex(this.DataConnection.IndexOf(item));
}
if (slot == -1)
{
slot = backupSlot;
}
if (slot < 0 || slot > this.SlotCount)
{
return;
}
switch (action)
{
case DataGridSelectionAction.AddCurrentToSelection:
SetRowSelection(slot, true /*isSelected*/, true /*setAnchorIndex*/);
break;
case DataGridSelectionAction.RemoveCurrentFromSelection:
SetRowSelection(slot, false /*isSelected*/, false /*setAnchorRowIndex*/);
break;
case DataGridSelectionAction.SelectFromAnchorToCurrent:
if (this.SelectionMode == DataGridSelectionMode.Extended && this.AnchorSlot != -1)
{
int anchorSlot = this.AnchorSlot;
ClearRowSelection(slot /*slotException*/, false /*resetAnchorSlot*/);
if (slot <= anchorSlot)
{
SetRowsSelection(slot, anchorSlot);
}
else
{
SetRowsSelection(anchorSlot, slot);
}
}
else
{
goto case DataGridSelectionAction.SelectCurrent;
}
break;
case DataGridSelectionAction.SelectCurrent:
ClearRowSelection(slot /*rowIndexException*/, true /*setAnchorRowIndex*/);
break;
case DataGridSelectionAction.None:
break;
}
if (this.CurrentSlot != slot || (this.CurrentColumnIndex != columnIndex && columnIndex != -1))
{
if (columnIndex == -1)
{
if (this.CurrentColumnIndex != -1)
{
columnIndex = this.CurrentColumnIndex;
}
else
{
DataGridColumn firstVisibleColumn = this.ColumnsInternal.FirstVisibleNonFillerColumn;
if (firstVisibleColumn != null)
{
columnIndex = firstVisibleColumn.Index;
}
}
}
if (columnIndex != -1)
{
if (!SetCurrentCellCore(columnIndex, slot, true /*commitEdit*/, SlotFromRowIndex(this.SelectedIndex) != slot /*endRowEdit*/)
|| (scrollIntoView && !ScrollSlotIntoView(columnIndex, slot, true /*forCurrentCellChange*/, false /*forceHorizontalScroll*/)))
{
return;
}
}
}
_successfullyUpdatedSelection = true;
}
finally
{
this.NoCurrentCellChangeCount--;
this.NoSelectionChangeCount--;
}
}
internal bool ProcessUpKey()
{
bool ctrl;
bool shift;
KeyboardHelper.GetMetaKeyState(out ctrl, out shift);
return this.ProcessUpKey(shift, ctrl);
}
internal void ProcessVerticalScroll(ScrollEventType scrollEventType)
{
if (scrollEventType == ScrollEventType.EndScroll)
{
this.IsVerticalScrollBarInteracting = false;
}
else if (scrollEventType == ScrollEventType.ThumbTrack)
{
this.IsVerticalScrollBarInteracting = true;
}
if (_verticalScrollChangesIgnored > 0)
{
return;
}
DiagnosticsDebug.Assert(DoubleUtil.LessThanOrClose(_vScrollBar.Value, _vScrollBar.Maximum), "Expected _vScrollBar.Value smaller than or close to _vScrollBar.Maximum.");
_verticalScrollChangesIgnored++;
try
{
DiagnosticsDebug.Assert(_vScrollBar != null, "Expected non-null _vScrollBar.");
if (scrollEventType == ScrollEventType.SmallIncrement)
{
this.DisplayData.PendingVerticalScrollHeight = GetVerticalSmallScrollIncrease();
double newVerticalOffset = _verticalOffset + this.DisplayData.PendingVerticalScrollHeight;
if (newVerticalOffset > _vScrollBar.Maximum)
{
this.DisplayData.PendingVerticalScrollHeight -= newVerticalOffset - _vScrollBar.Maximum;
}
}
else if (scrollEventType == ScrollEventType.SmallDecrement)
{
if (DoubleUtil.GreaterThan(this.NegVerticalOffset, 0))
{
this.DisplayData.PendingVerticalScrollHeight -= this.NegVerticalOffset;
}
else
{
int previousScrollingSlot = this.GetPreviousVisibleSlot(this.DisplayData.FirstScrollingSlot);
if (previousScrollingSlot >= 0)
{
ScrollSlotIntoView(previousScrollingSlot, false /*scrolledHorizontally*/);
}
return;
}
}
else
{
this.DisplayData.PendingVerticalScrollHeight = _vScrollBar.Value - _verticalOffset;
}
if (!DoubleUtil.IsZero(this.DisplayData.PendingVerticalScrollHeight))
{
// Invalidate so the scroll happens on idle
InvalidateRowsMeasure(false /*invalidateIndividualElements*/);
}
}
finally
{
_verticalScrollChangesIgnored--;
}
}
internal void RefreshRowsAndColumns(bool clearRows)
{
if (_measured)
{
try
{
_noCurrentCellChangeCount++;
if (clearRows)
{
ClearRows(false);
ClearRowGroupHeadersTable();
PopulateRowGroupHeadersTable();
RefreshSlotCounts();
}
if (this.AutoGenerateColumns)
{
// Column auto-generation refreshes the rows too
AutoGenerateColumnsPrivate();
}
foreach (DataGridColumn column in this.ColumnsItemsInternal)
{
// We don't need to refresh the state of AutoGenerated column headers because they're up-to-date
if (!column.IsAutoGenerated && column.HasHeaderCell)
{
column.HeaderCell.ApplyState(false);
}
}
RefreshRows(false /*recycleRows*/, false /*clearRows*/);
if (this.Columns.Count > 0 && this.CurrentColumnIndex == -1)
{
MakeFirstDisplayedCellCurrentCell();
}
else
{
_makeFirstDisplayedCellCurrentCellPending = false;
_desiredCurrentColumnIndex = -1;
FlushCurrentCellChanged();
}
}
finally
{
this.NoCurrentCellChangeCount--;
}
}
else
{
if (clearRows)
{
ClearRows(false /*recycle*/);
}
ClearRowGroupHeadersTable();
PopulateRowGroupHeadersTable();
RefreshSlotCounts();
}
}
internal void ResetColumnHeaderInteractionInfo()
{
DataGridColumnHeaderInteractionInfo interactionInfo = this.ColumnHeaderInteractionInfo;
if (interactionInfo != null)
{
interactionInfo.CapturedPointer = null;
interactionInfo.DragMode = DataGridColumnHeader.DragMode.None;
interactionInfo.DragPointerId = 0;
interactionInfo.DragColumn = null;
interactionInfo.DragStart = null;
interactionInfo.PressedPointerPositionHeaders = null;
interactionInfo.LastPointerPositionHeaders = null;
}
if (this.ColumnHeaders != null)
{
this.ColumnHeaders.DragColumn = null;
this.ColumnHeaders.DragIndicator = null;
this.ColumnHeaders.DropLocationIndicator = null;
}
}
internal bool ScrollSlotIntoView(int columnIndex, int slot, bool forCurrentCellChange, bool forceHorizontalScroll)
{
DiagnosticsDebug.Assert(columnIndex >= 0, "Expected positive columnIndex.");
DiagnosticsDebug.Assert(columnIndex < this.ColumnsItemsInternal.Count, "Expected columnIndex smaller than ColumnsItemsInternal.Count.");
DiagnosticsDebug.Assert(this.DisplayData.FirstDisplayedScrollingCol >= -1, "Expected DisplayData.FirstDisplayedScrollingCol greater than or equal to -1.");
DiagnosticsDebug.Assert(this.DisplayData.FirstDisplayedScrollingCol < this.ColumnsItemsInternal.Count, "Expected smaller than ColumnsItemsInternal.Count.");
DiagnosticsDebug.Assert(this.DisplayData.LastTotallyDisplayedScrollingCol >= -1, "Expected DisplayData.LastTotallyDisplayedScrollingCol greater than or equal to -1.");
DiagnosticsDebug.Assert(this.DisplayData.LastTotallyDisplayedScrollingCol < this.ColumnsItemsInternal.Count, "Expected DisplayData.LastTotallyDisplayedScrollingCol smaller than ColumnsItemsInternal.Count.");
DiagnosticsDebug.Assert(!IsSlotOutOfBounds(slot), "Expected IsSlotOutOfBounds(slot) is false.");
DiagnosticsDebug.Assert(this.DisplayData.FirstScrollingSlot >= -1, "Expected DisplayData.FirstScrollingSlot greater than or equal to -1.");
DiagnosticsDebug.Assert(this.DisplayData.FirstScrollingSlot < this.SlotCount, "Expected DisplayData.FirstScrollingSlot smaller than SlotCount.");
DiagnosticsDebug.Assert(this.ColumnsItemsInternal[columnIndex].IsVisible, "Expected ColumnsItemsInternal[columnIndex].IsVisible is true.");
if (this.CurrentColumnIndex >= 0 &&
(this.CurrentColumnIndex != columnIndex || this.CurrentSlot != slot))
{
if (!CommitEditForOperation(columnIndex, slot, forCurrentCellChange) || IsInnerCellOutOfBounds(columnIndex, slot))
{
return false;
}
}
double oldHorizontalOffset = this.HorizontalOffset;
bool rowGroupHeadersTableContainsSlot = this.RowGroupHeadersTable.Contains(slot);
// scroll horizontally unless we're on a RowGroupHeader and we're not forcing horizontal scrolling
if ((forceHorizontalScroll || (slot != -1 && !rowGroupHeadersTableContainsSlot)) &&
!ScrollColumnIntoView(columnIndex))
{
return false;
}
// scroll vertically
if (!ScrollSlotIntoView(slot, oldHorizontalOffset != this.HorizontalOffset /*scrolledHorizontally*/))
{
return false;
}
// Scrolling horizontally or vertically could cause less rows to be displayed
this.DisplayData.FullyRecycleElements();
DataGridAutomationPeer peer = DataGridAutomationPeer.FromElement(this) as DataGridAutomationPeer;
if (peer != null)
{
peer.RaiseAutomationScrollEvents();
}
return true;
}
// Convenient overload that commits the current edit.
internal bool SetCurrentCellCore(int columnIndex, int slot)
{
return SetCurrentCellCore(columnIndex, slot, true /*commitEdit*/, true /*endRowEdit*/);
}
internal void UpdateHorizontalOffset(double newValue)
{
if (this.HorizontalOffset != newValue)
{
this.HorizontalOffset = newValue;
InvalidateColumnHeadersMeasure();
InvalidateRowsMeasure(true);
}
}
internal bool UpdateSelectionAndCurrency(int columnIndex, int slot, DataGridSelectionAction action, bool scrollIntoView)
{
_successfullyUpdatedSelection = false;
_noSelectionChangeCount++;
_noCurrentCellChangeCount++;
try
{
if (this.ColumnsInternal.RowGroupSpacerColumn.IsRepresented &&
columnIndex == this.ColumnsInternal.RowGroupSpacerColumn.Index)
{
columnIndex = -1;
}
if (IsSlotOutOfSelectionBounds(slot) || (columnIndex != -1 && IsColumnOutOfBounds(columnIndex)))
{
return false;
}
int newCurrentPosition = -1;
object item = ItemFromSlot(slot, ref newCurrentPosition);
if (newCurrentPosition == this.DataConnection.NewItemPlaceholderIndex)
{
newCurrentPosition = -1;
}
if (this.EditingRow != null && slot != this.EditingRow.Slot && !CommitEdit(DataGridEditingUnit.Row, true))
{
return false;
}
if (this.DataConnection.CollectionView != null &&
this.DataConnection.CollectionView.CurrentPosition != newCurrentPosition)
{
this.DataConnection.MoveCurrentTo(item, slot, columnIndex, action, scrollIntoView);
}
else
{
this.ProcessSelectionAndCurrency(columnIndex, item, slot, action, scrollIntoView);
}
}
finally
{
this.NoCurrentCellChangeCount--;
this.NoSelectionChangeCount--;
}
return _successfullyUpdatedSelection;
}
internal void UpdateStateOnCurrentChanged(object currentItem, int currentPosition)
{
if ((currentItem == this.CurrentItem) &&
(_isUserSorting || (currentItem == this.SelectedItem && currentPosition == this.SelectedIndex)))
{
// The DataGrid's CurrentItem is already up-to-date, so we don't need to do anything.
// In the sorting case, we receive a CurrentChanged notification if the current item
// changes position in the CollectionView. However, our CurrentItem is already
// in the correct position in this case, and we do not want to update the selection so
// we no-op here.
return;
}
int columnIndex = this.CurrentColumnIndex;
if (columnIndex == -1)
{
if (this.IsColumnOutOfBounds(_desiredCurrentColumnIndex))
{
columnIndex = this.FirstDisplayedNonFillerColumnIndex;
}
else if (this.ColumnsInternal.RowGroupSpacerColumn.IsRepresented && _desiredCurrentColumnIndex == this.ColumnsInternal.RowGroupSpacerColumn.Index)
{
columnIndex = this.FirstDisplayedNonFillerColumnIndex;
}
else
{
columnIndex = _desiredCurrentColumnIndex;
}
}
// The CollectionView will potentially raise multiple CurrentChanged events during a single
// add operation, so we should avoid resetting our desired column index until it's committed.
if (!this.DataConnection.IsAddingNew)
{
_desiredCurrentColumnIndex = -1;
}
try
{
_noSelectionChangeCount++;
_noCurrentCellChangeCount++;
if (!this.CommitEdit())
{
this.CancelEdit(DataGridEditingUnit.Row, false);
}
this.ClearRowSelection(true);
if (currentItem == null)
{
SetCurrentCellCore(-1, -1);
}
else
{
int slot = SlotFromRowIndex(currentPosition);
this.ProcessSelectionAndCurrency(columnIndex, currentItem, slot, DataGridSelectionAction.SelectCurrent, false);
}
}
finally
{
this.NoCurrentCellChangeCount--;
this.NoSelectionChangeCount--;
}
}
internal bool UpdateStateOnTapped(TappedRoutedEventArgs args, int columnIndex, int slot, bool allowEdit)
{
bool ctrl, shift;
KeyboardHelper.GetMetaKeyState(out ctrl, out shift);
return this.UpdateStateOnTapped(args, columnIndex, slot, allowEdit, shift, ctrl);
}
internal void UpdateVerticalScrollBar()
{
if (_vScrollBar != null && _vScrollBar.Visibility == Visibility.Visible)
{
double cellsHeight = this.CellsHeight;
double edgedRowsHeightCalculated = this.EdgedRowsHeightCalculated;
UpdateVerticalScrollBar(
edgedRowsHeightCalculated > cellsHeight /*needVertScrollBar*/,
this.VerticalScrollBarVisibility == ScrollBarVisibility.Visible /*forceVertScrollBar*/,
edgedRowsHeightCalculated,
cellsHeight);
}
}
/// <summary>
/// If the editing element has focus, this method will set focus to the DataGrid itself
/// in order to force the element to lose focus. It will then wait for the editing element's
/// LostFocus event, at which point it will perform the specified action.
/// NOTE: It is important to understand that the specified action will be performed when the editing
/// element loses focus only if this method returns true. If it returns false, then the action
/// will not be performed later on, and should instead be performed by the caller, if necessary.
/// </summary>
/// <param name="action">Action to perform after the editing element loses focus</param>
/// <returns>True if the editing element had focus and the action was cached away; false otherwise</returns>
internal bool WaitForLostFocus(Action action)
{
if (this.EditingRow != null && this.EditingColumnIndex != -1 && !_executingLostFocusActions)
{
DataGridColumn editingColumn = this.ColumnsItemsInternal[this.EditingColumnIndex];
FrameworkElement editingElement = editingColumn.GetCellContent(this.EditingRow);
if (editingElement != null && editingElement.ContainsChild(_focusedObject))
{
DiagnosticsDebug.Assert(_lostFocusActions != null, "Expected non-null _lostFocusActions.");
_lostFocusActions.Enqueue(action);
editingElement.LostFocus += new RoutedEventHandler(EditingElement_LostFocus);
this.IsTabStop = true;
this.Focus(FocusState.Programmatic);
return true;
}
}
return false;
}
// Applies the given Style to the Row if it's supposed to use DataGrid.RowStyle
private static void EnsureElementStyle(FrameworkElement element, Style oldDataGridStyle, Style newDataGridStyle)
{
DiagnosticsDebug.Assert(element != null, "Expected non-null element.");
// Apply the DataGrid style if the row was using the old DataGridRowStyle before
if (element != null && (element.Style == null || element.Style == oldDataGridStyle))
{
element.SetStyleWithType(newDataGridStyle);
}
}
private bool AddNewItem(RoutedEventArgs editingEventArgs)
{
#if FEATURE_IEDITABLECOLLECTIONVIEW
if (this.DataConnection.EditableCollectionView != null && this.DataConnection.EditableCollectionView.CanAddNew)
{
_desiredCurrentColumnIndex = this.CurrentColumnIndex;
object addItem = this.DataConnection.EditableCollectionView.AddNew();
if (this.CurrentItem != this.DataConnection.EditableCollectionView.CurrentAddItem)
{
int newItemSlot = SlotFromRowIndex(this.DataConnection.IndexOf(addItem));
SetAndSelectCurrentCell(this.CurrentColumnIndex, newItemSlot, true);
if (!_successfullyUpdatedSelection)
{
return false;
}
}
return BeginCellEdit(editingEventArgs);
}
#endif
return false;
}
private void AddNewCellPrivate(DataGridRow row, DataGridColumn column)
{
DataGridCell newCell = new DataGridCell();
PopulateCellContent(false /*isCellEdited*/, column, row, newCell);
if (row.OwningGrid != null)
{
newCell.OwningColumn = column;
newCell.Visibility = column.Visibility;
}
if (column is DataGridFillerColumn)
{
Windows.UI.Xaml.Automation.AutomationProperties.SetAccessibilityView(
newCell,
AccessibilityView.Raw);
}
newCell.EnsureStyle(null);
row.Cells.Insert(column.Index, newCell);
}
// TODO: Call this method once the UISettings has a public property for the "Automatically hide scroll bars in Windows" setting
// private void AutoHideScrollBarsChanged()
// {
// if (UISettingsHelper.AreSettingsAutoHidingScrollBars)
// {
// SwitchScrollBarsVisualStates(_proposedScrollBarsState, _proposedScrollBarsSeparatorState, true /*useTransitions*/);
// }
// else
// {
// if (this.AreBothScrollBarsVisible)
// {
// if (UISettingsHelper.AreSettingsEnablingAnimations)
// {
// SwitchScrollBarsVisualStates(ScrollBarVisualState.MouseIndicatorFull, this.IsEnabled ? ScrollBarsSeparatorVisualState.SeparatorExpanded : ScrollBarsSeparatorVisualState.SeparatorCollapsed, true /*useTransitions*/);
// }
// else
// {
// SwitchScrollBarsVisualStates(ScrollBarVisualState.MouseIndicatorFull, this.IsEnabled ? ScrollBarsSeparatorVisualState.SeparatorExpandedWithoutAnimation : ScrollBarsSeparatorVisualState.SeparatorCollapsed, true /*useTransitions*/);
// }
// }
// else
// {
// if (UISettingsHelper.AreSettingsEnablingAnimations)
// {
// SwitchScrollBarsVisualStates(ScrollBarVisualState.MouseIndicator, ScrollBarsSeparatorVisualState.SeparatorCollapsed, true/*useTransitions*/);
// }
// else
// {
// SwitchScrollBarsVisualStates(ScrollBarVisualState.MouseIndicator, this.IsEnabled ? ScrollBarsSeparatorVisualState.SeparatorCollapsedWithoutAnimation : ScrollBarsSeparatorVisualState.SeparatorCollapsed, true /*useTransitions*/);
// }
// }
// }
// }
private bool BeginCellEdit(RoutedEventArgs editingEventArgs)
{
if (this.CurrentColumnIndex == -1 || !GetRowSelection(this.CurrentSlot))
{
return false;
}
DiagnosticsDebug.Assert(this.CurrentColumnIndex >= 0, "Expected positive CurrentColumnIndex.");
DiagnosticsDebug.Assert(this.CurrentColumnIndex < this.ColumnsItemsInternal.Count, "Expected CurrentColumnIndex smaller than ColumnsItemsInternal.Count.");
DiagnosticsDebug.Assert(this.CurrentSlot >= -1, "Expected CurrentSlot greater than or equal to -1.");
DiagnosticsDebug.Assert(this.CurrentSlot < this.SlotCount, "Expected CurrentSlot smaller than SlotCount.");
DiagnosticsDebug.Assert(this.EditingRow == null || this.EditingRow.Slot == this.CurrentSlot, "Expected null EditingRow or EditingRow.Slot equal to CurrentSlot.");
DiagnosticsDebug.Assert(!GetColumnEffectiveReadOnlyState(this.CurrentColumn), "Expected GetColumnEffectiveReadOnlyState(CurrentColumn) is false.");
DiagnosticsDebug.Assert(this.CurrentColumn.IsVisible, "Expected CurrentColumn.IsVisible is true.");
if (_editingColumnIndex != -1)
{
// Current cell is already in edit mode
DiagnosticsDebug.Assert(_editingColumnIndex == this.CurrentColumnIndex, "Expected _editingColumnIndex equals CurrentColumnIndex.");
return true;
}
// When we begin edit on the NewItemPlaceHolder row, we should try to add a new item.
if (this.CurrentSlot == SlotFromRowIndex(this.DataConnection.NewItemPlaceholderIndex))
{
return this.AddNewItem(editingEventArgs);
}
// Get or generate the editing row if it doesn't exist
DataGridRow dataGridRow = this.EditingRow;
if (dataGridRow == null)
{
DiagnosticsDebug.Assert(!this.RowGroupHeadersTable.Contains(this.CurrentSlot), "Expected CurrentSlot not contained in RowGroupHeadersTable.");
if (this.IsSlotVisible(this.CurrentSlot))
{
dataGridRow = this.DisplayData.GetDisplayedElement(this.CurrentSlot) as DataGridRow;
DiagnosticsDebug.Assert(dataGridRow != null, "Expected non-null dataGridRow.");
}
else
{
dataGridRow = GenerateRow(RowIndexFromSlot(this.CurrentSlot), this.CurrentSlot);
dataGridRow.Clip = new RectangleGeometry();
}
if (this.DataConnection.IsAddingNew)
{
// We just began editing the new item row, so set a flag that prevents us from running
// full entity validation until the user explicitly attempts to end editing the row.
_initializingNewItem = true;
}
}
DiagnosticsDebug.Assert(dataGridRow != null, "Expected non-null dataGridRow.");
// Cache these to see if they change later
int currentRowIndex = this.CurrentSlot;
int currentColumnIndex = this.CurrentColumnIndex;
// Raise the BeginningEdit event
DataGridCell dataGridCell = dataGridRow.Cells[this.CurrentColumnIndex];
DataGridBeginningEditEventArgs e = new DataGridBeginningEditEventArgs(this.CurrentColumn, dataGridRow, editingEventArgs);
OnBeginningEdit(e);
if (e.Cancel ||
currentRowIndex != this.CurrentSlot ||
currentColumnIndex != this.CurrentColumnIndex ||
!GetRowSelection(this.CurrentSlot) ||
(this.EditingRow == null && !BeginRowEdit(dataGridRow)))
{
// If either BeginningEdit was canceled, currency/selection was changed in the event handler,
// or we failed opening the row for edit, then we can no longer continue BeginCellEdit
return false;
}
if (this.EditingRow == null || this.EditingRow.Slot != this.CurrentSlot)
{
// This check was added to safeguard against a ListCollectionView bug where the collection changed currency
// during a CommitNew operation but failed to raise a CurrentChanged event.
return false;
}
// Finally, we can prepare the cell for editing
_editingColumnIndex = this.CurrentColumnIndex;
_editingEventArgs = editingEventArgs;
this.EditingRow.Cells[this.CurrentColumnIndex].ApplyCellState(true /*animate*/);
PopulateCellContent(true /*isCellEdited*/, this.CurrentColumn, dataGridRow, dataGridCell);
return true;
}
private bool BeginRowEdit(DataGridRow dataGridRow)
{
DiagnosticsDebug.Assert(this.EditingRow == null, "Expected non-null EditingRow.");
DiagnosticsDebug.Assert(dataGridRow != null, "Expected non-null dataGridRow.");
DiagnosticsDebug.Assert(this.CurrentSlot >= -1, "Expected CurrentSlot greater than or equal to -1.");
DiagnosticsDebug.Assert(this.CurrentSlot < this.SlotCount, "Expected CurrentSlot smaller than SlotCount.");
if (this.DataConnection.BeginEdit(dataGridRow.DataContext))
{
this.EditingRow = dataGridRow;
this.GenerateEditingElements();
this.ValidateEditingRow(false /*scrollIntoView*/, true /*wireEvents*/);
// Raise the automation invoke event for the row that just began edit
DataGridAutomationPeer peer = DataGridAutomationPeer.FromElement(this) as DataGridAutomationPeer;
if (peer != null && AutomationPeer.ListenerExists(AutomationEvents.InvokePatternOnInvoked))
{
peer.RaiseAutomationInvokeEvents(DataGridEditingUnit.Row, null, dataGridRow);
}
return true;
}
return false;
}
private bool CancelRowEdit(bool exitEditingMode)
{
if (this.EditingRow == null)
{
return true;
}
DiagnosticsDebug.Assert(this.EditingRow != null, "Expected non-null EditingRow.");
DiagnosticsDebug.Assert(this.EditingRow.Index >= -1, "Expected EditingRow greater or equal to -1.");
DiagnosticsDebug.Assert(this.EditingRow.Slot < this.SlotCount, "Expected EditingRow smaller than SlotCount.");
DiagnosticsDebug.Assert(this.CurrentColumn != null, "Expected non-null CurrentColumn.");
object dataItem = this.EditingRow.DataContext;
if (!this.DataConnection.CancelEdit(dataItem))
{
return false;
}
foreach (DataGridColumn column in this.Columns)
{
if (!exitEditingMode && column.Index == _editingColumnIndex && column is DataGridBoundColumn)
{
continue;
}
PopulateCellContent(!exitEditingMode && column.Index == _editingColumnIndex /*isCellEdited*/, column, this.EditingRow, this.EditingRow.Cells[column.Index]);
}
return true;
}
private bool CommitEditForOperation(int columnIndex, int slot, bool forCurrentCellChange)
{
if (forCurrentCellChange)
{
if (!EndCellEdit(DataGridEditAction.Commit, true /*exitEditingMode*/, true /*keepFocus*/, true /*raiseEvents*/))
{
return false;
}
if (this.CurrentSlot != slot &&
!EndRowEdit(DataGridEditAction.Commit, true /*exitEditingMode*/, true /*raiseEvents*/))
{
return false;
}
}
if (IsColumnOutOfBounds(columnIndex))
{
return false;
}
if (slot >= this.SlotCount)
{
// Current cell was reset because the commit deleted row(s).
// Since the user wants to change the current cell, we don't
// want to end up with no current cell. We pick the last row
// in the grid which may be the 'new row'.
int lastSlot = this.LastVisibleSlot;
if (forCurrentCellChange &&
this.CurrentColumnIndex == -1 &&
lastSlot != -1)
{
SetAndSelectCurrentCell(columnIndex, lastSlot, false /*forceCurrentCellSelection (unused here)*/);
}
// Interrupt operation because it has become invalid.
return false;
}
return true;
}
private bool CommitRowEdit(bool exitEditingMode)
{
if (this.EditingRow == null)
{
return true;
}
DiagnosticsDebug.Assert(this.EditingRow != null, "Expected non-null EditingRow.");
DiagnosticsDebug.Assert(this.EditingRow.Index >= -1, "Expected EditingRow.Index greater than or equal to -1.");
DiagnosticsDebug.Assert(this.EditingRow.Slot < this.SlotCount, "Expected EditingRow.Slot smaller than SlotCount.");
if (!ValidateEditingRow(true /*scrollIntoView*/, false /*wireEvents*/))
{
return false;
}
this.DataConnection.EndEdit(this.EditingRow.DataContext);
if (!exitEditingMode)
{
this.DataConnection.BeginEdit(this.EditingRow.DataContext);
}
return true;
}
private void CompleteCellsCollection(DataGridRow dataGridRow)
{
DiagnosticsDebug.Assert(dataGridRow != null, "Expected non-null dataGridRow.");
int cellsInCollection = dataGridRow.Cells.Count;
if (this.ColumnsItemsInternal.Count > cellsInCollection)
{
for (int columnIndex = cellsInCollection; columnIndex < this.ColumnsItemsInternal.Count; columnIndex++)
{
AddNewCellPrivate(dataGridRow, this.ColumnsItemsInternal[columnIndex]);
}
}
}
private void ComputeScrollBarsLayout()
{
if (_ignoreNextScrollBarsLayout)
{
_ignoreNextScrollBarsLayout = false;
// TODO: This optimization is causing problems with initial layout:
// Investigate why horizontal ScrollBar sometimes has incorrect thumb size when
// it first appears after adding a row when this perf improvement is turned on.
// return;
}
bool isHorizontalScrollBarOverCells = this.IsHorizontalScrollBarOverCells;
bool isVerticalScrollBarOverCells = this.IsVerticalScrollBarOverCells;
double cellsWidth = this.CellsWidth;
double cellsHeight = this.CellsHeight;
bool allowHorizScrollBar = false;
bool forceHorizScrollBar = false;
double horizScrollBarHeight = 0;
if (_hScrollBar != null)
{
forceHorizScrollBar = this.HorizontalScrollBarVisibility == ScrollBarVisibility.Visible;
allowHorizScrollBar = forceHorizScrollBar || (this.ColumnsInternal.VisibleColumnCount > 0 &&
this.HorizontalScrollBarVisibility != ScrollBarVisibility.Disabled &&
this.HorizontalScrollBarVisibility != ScrollBarVisibility.Hidden);
// Compensate if the horizontal scrollbar is already taking up space
if (!forceHorizScrollBar && _hScrollBar.Visibility == Visibility.Visible)
{
if (!isHorizontalScrollBarOverCells)
{
cellsHeight += _hScrollBar.DesiredSize.Height;
}
}
if (!isHorizontalScrollBarOverCells)
{
horizScrollBarHeight = _hScrollBar.Height + _hScrollBar.Margin.Top + _hScrollBar.Margin.Bottom;
}
}
bool allowVertScrollBar = false;
bool forceVertScrollBar = false;
double vertScrollBarWidth = 0;
if (_vScrollBar != null)
{
forceVertScrollBar = this.VerticalScrollBarVisibility == ScrollBarVisibility.Visible;
allowVertScrollBar = forceVertScrollBar || (this.ColumnsItemsInternal.Count > 0 &&
this.VerticalScrollBarVisibility != ScrollBarVisibility.Disabled &&
this.VerticalScrollBarVisibility != ScrollBarVisibility.Hidden);
// Compensate if the vertical scrollbar is already taking up space
if (!forceVertScrollBar && _vScrollBar.Visibility == Visibility.Visible)
{
if (!isVerticalScrollBarOverCells)
{
cellsWidth += _vScrollBar.DesiredSize.Width;
}
}
if (!isVerticalScrollBarOverCells)
{
vertScrollBarWidth = _vScrollBar.Width + _vScrollBar.Margin.Left + _vScrollBar.Margin.Right;
}
}
// Now cellsWidth is the width potentially available for displaying data cells.
// Now cellsHeight is the height potentially available for displaying data cells.
bool needHorizScrollBar = false;
bool needVertScrollBar = false;
double totalVisibleWidth = this.ColumnsInternal.VisibleEdgedColumnsWidth;
double totalVisibleFrozenWidth = this.ColumnsInternal.GetVisibleFrozenEdgedColumnsWidth();
UpdateDisplayedRows(this.DisplayData.FirstScrollingSlot, this.CellsHeight);
double totalVisibleHeight = this.EdgedRowsHeightCalculated;
if (!forceHorizScrollBar && !forceVertScrollBar)
{
bool needHorizScrollBarWithoutVertScrollBar = false;
if (allowHorizScrollBar &&
DoubleUtil.GreaterThan(totalVisibleWidth, cellsWidth) &&
DoubleUtil.LessThan(totalVisibleFrozenWidth, cellsWidth) &&
DoubleUtil.LessThanOrClose(horizScrollBarHeight, cellsHeight))
{
double oldDataHeight = cellsHeight;
cellsHeight -= horizScrollBarHeight;
DiagnosticsDebug.Assert(cellsHeight >= 0, "Expected positive cellsHeight.");
needHorizScrollBarWithoutVertScrollBar = needHorizScrollBar = true;
if (vertScrollBarWidth > 0 &&
allowVertScrollBar &&
(DoubleUtil.LessThanOrClose(totalVisibleWidth - cellsWidth, vertScrollBarWidth) || DoubleUtil.LessThanOrClose(cellsWidth - totalVisibleFrozenWidth, vertScrollBarWidth)))
{
// Would we still need a horizontal scrollbar without the vertical one?
UpdateDisplayedRows(this.DisplayData.FirstScrollingSlot, cellsHeight);
if (this.DisplayData.NumTotallyDisplayedScrollingElements != this.VisibleSlotCount)
{
needHorizScrollBar = DoubleUtil.LessThan(totalVisibleFrozenWidth, cellsWidth - vertScrollBarWidth);
}
if (!needHorizScrollBar)
{
// Restore old data height because turns out a horizontal scroll bar wouldn't make sense
cellsHeight = oldDataHeight;
}
}
}
// Store the current FirstScrollingSlot because removing the horizontal scrollbar could scroll
// the DataGrid up; however, if we realize later that we need to keep the horizontal scrollbar
// then we should use the first slot stored here which is not scrolled.
int firstScrollingSlot = this.DisplayData.FirstScrollingSlot;
UpdateDisplayedRows(firstScrollingSlot, cellsHeight);
if (allowVertScrollBar &&
DoubleUtil.GreaterThan(cellsHeight, 0) &&
DoubleUtil.LessThanOrClose(vertScrollBarWidth, cellsWidth) &&
this.DisplayData.NumTotallyDisplayedScrollingElements != this.VisibleSlotCount)
{
cellsWidth -= vertScrollBarWidth;
DiagnosticsDebug.Assert(cellsWidth >= 0, "Expected positive cellsWidth.");
needVertScrollBar = true;
}
this.DisplayData.FirstDisplayedScrollingCol = ComputeFirstVisibleScrollingColumn();
// We compute the number of visible columns only after we set up the vertical scroll bar.
ComputeDisplayedColumns();
if ((vertScrollBarWidth > 0 || horizScrollBarHeight > 0) &&
allowHorizScrollBar &&
needVertScrollBar && !needHorizScrollBar &&
DoubleUtil.GreaterThan(totalVisibleWidth, cellsWidth) &&
DoubleUtil.LessThan(totalVisibleFrozenWidth, cellsWidth) &&
DoubleUtil.LessThanOrClose(horizScrollBarHeight, cellsHeight))
{
cellsWidth += vertScrollBarWidth;
cellsHeight -= horizScrollBarHeight;
DiagnosticsDebug.Assert(cellsHeight >= 0, "Expected positive cellsHeight.");
needVertScrollBar = false;
UpdateDisplayedRows(firstScrollingSlot, cellsHeight);
if (cellsHeight > 0 &&
vertScrollBarWidth <= cellsWidth &&
this.DisplayData.NumTotallyDisplayedScrollingElements != this.VisibleSlotCount)
{
cellsWidth -= vertScrollBarWidth;
DiagnosticsDebug.Assert(cellsWidth >= 0, "Expected positive cellsWidth.");
needVertScrollBar = true;
}
if (needVertScrollBar)
{
needHorizScrollBar = true;
}
else
{
needHorizScrollBar = needHorizScrollBarWithoutVertScrollBar;
}
}
}
else if (forceHorizScrollBar && !forceVertScrollBar)
{
if (allowVertScrollBar)
{
if (cellsHeight > 0 &&
DoubleUtil.LessThanOrClose(vertScrollBarWidth, cellsWidth) &&
this.DisplayData.NumTotallyDisplayedScrollingElements != this.VisibleSlotCount)
{
cellsWidth -= vertScrollBarWidth;
DiagnosticsDebug.Assert(cellsWidth >= 0, "Expected positive cellsWidth.");
needVertScrollBar = true;
}
this.DisplayData.FirstDisplayedScrollingCol = ComputeFirstVisibleScrollingColumn();
ComputeDisplayedColumns();
}
needHorizScrollBar = totalVisibleWidth > cellsWidth && totalVisibleFrozenWidth < cellsWidth;
}
else if (!forceHorizScrollBar && forceVertScrollBar)
{
if (allowHorizScrollBar)
{
if (cellsWidth > 0 &&
DoubleUtil.LessThanOrClose(horizScrollBarHeight, cellsHeight) &&
DoubleUtil.GreaterThan(totalVisibleWidth, cellsWidth) &&
DoubleUtil.LessThan(totalVisibleFrozenWidth, cellsWidth))
{
cellsHeight -= horizScrollBarHeight;
DiagnosticsDebug.Assert(cellsHeight >= 0, "Expected positive cellsHeight.");
needHorizScrollBar = true;
UpdateDisplayedRows(this.DisplayData.FirstScrollingSlot, cellsHeight);
}
this.DisplayData.FirstDisplayedScrollingCol = ComputeFirstVisibleScrollingColumn();
ComputeDisplayedColumns();
}
needVertScrollBar = this.DisplayData.NumTotallyDisplayedScrollingElements != this.VisibleSlotCount;
}
else
{
DiagnosticsDebug.Assert(forceHorizScrollBar, "Expected forceHorizScrollBar is true.");
DiagnosticsDebug.Assert(forceVertScrollBar, "Expected forceVertScrollBar is true.");
DiagnosticsDebug.Assert(allowHorizScrollBar, "Expected allowHorizScrollBar is true.");
DiagnosticsDebug.Assert(allowVertScrollBar, "Expected allowVertScrollBar is true.");
this.DisplayData.FirstDisplayedScrollingCol = ComputeFirstVisibleScrollingColumn();
ComputeDisplayedColumns();
needVertScrollBar = this.DisplayData.NumTotallyDisplayedScrollingElements != this.VisibleSlotCount;
needHorizScrollBar = totalVisibleWidth > cellsWidth && totalVisibleFrozenWidth < cellsWidth;
}
UpdateHorizontalScrollBar(needHorizScrollBar, forceHorizScrollBar, totalVisibleWidth, totalVisibleFrozenWidth, cellsWidth);
UpdateVerticalScrollBar(needVertScrollBar, forceVertScrollBar, totalVisibleHeight, cellsHeight);
if (_topRightCornerHeader != null)
{
// Show the TopRightHeaderCell based on vertical ScrollBar visibility
if (this.AreColumnHeadersVisible &&
_vScrollBar != null && _vScrollBar.Visibility == Visibility.Visible)
{
_topRightCornerHeader.Visibility = Visibility.Visible;
}
else
{
_topRightCornerHeader.Visibility = Visibility.Collapsed;
}
}
if (_bottomRightCorner != null)
{
// Show the BottomRightCorner when both scrollbars are visible.
_bottomRightCorner.Visibility =
_hScrollBar != null && _hScrollBar.Visibility == Visibility.Visible &&
_vScrollBar != null && _vScrollBar.Visibility == Visibility.Visible ?
Visibility.Visible : Visibility.Collapsed;
}
this.DisplayData.FullyRecycleElements();
}
#if FEATURE_VALIDATION_SUMMARY
/// <summary>
/// Create an ValidationSummaryItem for a given ValidationResult, by finding all cells related to the
/// validation error and adding them as separate ValidationSummaryItemSources.
/// </summary>
/// <param name="validationResult">ValidationResult</param>
/// <returns>ValidationSummaryItem</returns>
private ValidationSummaryItem CreateValidationSummaryItem(ValidationResult validationResult)
{
DiagnosticsDebug.Assert(validationResult != null);
DiagnosticsDebug.Assert(_validationSummary != null);
DiagnosticsDebug.Assert(this.EditingRow != null, "Expected non-null EditingRow.");
ValidationSummaryItem validationSummaryItem = new ValidationSummaryItem(validationResult.ErrorMessage);
validationSummaryItem.Context = validationResult;
string messageHeader = null;
foreach (DataGridColumn column in this.ColumnsInternal.GetDisplayedColumns(c => c.IsVisible && !c.IsReadOnly))
{
foreach (string property in validationResult.MemberNames)
{
if (!string.IsNullOrEmpty(property) && column.BindingPaths.Contains(property))
{
validationSummaryItem.Sources.Add(new ValidationSummaryItemSource(property, this.EditingRow.Cells[column.Index]));
if (string.IsNullOrEmpty(messageHeader) && column.Header != null)
{
messageHeader = column.Header.ToString();
}
}
}
}
DiagnosticsDebug.Assert(validationSummaryItem.ItemType == ValidationSummaryItemType.ObjectError);
if (_propertyValidationResults.ContainsEqualValidationResult(validationResult))
{
validationSummaryItem.MessageHeader = messageHeader;
validationSummaryItem.ItemType = ValidationSummaryItemType.PropertyError;
}
return validationSummaryItem;
}
#endif
/// <summary>
/// Handles the current editing element's LostFocus event by performing any actions that
/// were cached by the WaitForLostFocus method.
/// </summary>
/// <param name="sender">Editing element</param>
/// <param name="e">RoutedEventArgs</param>
private void EditingElement_LostFocus(object sender, RoutedEventArgs e)
{
FrameworkElement editingElement = sender as FrameworkElement;
if (editingElement != null)
{
editingElement.LostFocus -= new RoutedEventHandler(EditingElement_LostFocus);
if (this.EditingRow != null && this.EditingColumnIndex != -1)
{
this.FocusEditingCell(true);
}
DiagnosticsDebug.Assert(_lostFocusActions != null, "Expected non-null _lostFocusActions.");
try
{
_executingLostFocusActions = true;
while (_lostFocusActions.Count > 0)
{
_lostFocusActions.Dequeue()();
}
}
finally
{
_executingLostFocusActions = false;
}
}
}
// Makes sure horizontal layout is updated to reflect any changes that affect it
private void EnsureHorizontalLayout()
{
this.ColumnsInternal.EnsureVisibleEdgedColumnsWidth();
InvalidateColumnHeadersMeasure();
InvalidateRowsMeasure(true);
InvalidateMeasure();
}
/// <summary>
/// Ensures that the RowHeader widths are properly sized and invalidates them if they are not
/// </summary>
/// <returns>True if a RowHeader or RowGroupHeader was invalidated</returns>
private bool EnsureRowHeaderWidth()
{
bool invalidated = false;
if (this.AreRowHeadersVisible)
{
if (this.AreColumnHeadersVisible)
{
EnsureTopLeftCornerHeader();
}
if (_rowsPresenter != null)
{
foreach (UIElement element in _rowsPresenter.Children)
{
DataGridRow row = element as DataGridRow;
if (row != null)
{
// If the RowHeader resulted in a different width the last time it was measured, we need
// to re-measure it
if (row.HeaderCell != null && row.HeaderCell.DesiredSize.Width != this.ActualRowHeaderWidth)
{
row.HeaderCell.InvalidateMeasure();
invalidated = true;
}
}
else
{
DataGridRowGroupHeader groupHeader = element as DataGridRowGroupHeader;
if (groupHeader != null && groupHeader.HeaderCell != null && groupHeader.HeaderCell.DesiredSize.Width != this.ActualRowHeaderWidth)
{
groupHeader.HeaderCell.InvalidateMeasure();
invalidated = true;
}
}
}
if (invalidated)
{
// We need to update the width of the horizontal scrollbar if the rowHeaders' width actually changed
if (this.ColumnsInternal.VisibleStarColumnCount > 0)
{
this.ColumnsInternal.EnsureVisibleEdgedColumnsWidth();
}
InvalidateMeasure();
}
}
}
return invalidated;
}
private void EnsureRowsPresenterVisibility()
{
if (_rowsPresenter != null)
{
// RowCount doesn't need to be considered, doing so might cause extra Visibility changes
_rowsPresenter.Visibility = this.ColumnsInternal.FirstVisibleNonFillerColumn == null ? Visibility.Collapsed : Visibility.Visible;
}
}
private void EnsureTopLeftCornerHeader()
{
if (_topLeftCornerHeader != null)
{
_topLeftCornerHeader.Visibility = this.HeadersVisibility == DataGridHeadersVisibility.All ? Visibility.Visible : Visibility.Collapsed;
if (_topLeftCornerHeader.Visibility == Visibility.Visible)
{
if (!double.IsNaN(this.RowHeaderWidth))
{
// RowHeaderWidth is set explicitly so we should use that
_topLeftCornerHeader.Width = this.RowHeaderWidth;
}
else if (this.VisibleSlotCount > 0)
{
// RowHeaders AutoSize and we have at least 1 row so take the desired width
_topLeftCornerHeader.Width = this.RowHeadersDesiredWidth;
}
}
}
}
#if FEATURE_VALIDATION_SUMMARY
/// <summary>
/// Handles the ValidationSummary's FocusingInvalidControl event and begins edit on the cells
/// that are associated with the selected error.
/// </summary>
/// <param name="sender">ValidationSummary</param>
/// <param name="e">FocusingInvalidControlEventArgs</param>
private void ValidationSummary_FocusingInvalidControl(object sender, FocusingInvalidControlEventArgs e)
{
DiagnosticsDebug.Assert(_validationSummary != null);
if (this.EditingRow == null || this.IsSlotOutOfBounds(this.EditingRow.Slot) || this.EditingRow.Slot == -1 || !ScrollSlotIntoView(this.EditingRow.Slot, false /*scrolledHorizontally*/))
{
return;
}
// We need to focus the DataGrid in case the focused element gets removed when we end edit.
if ((_editingColumnIndex == -1 || (this.Focus(FocusState.Programmatic) && EndCellEdit(DataGridEditAction.Commit, true, true, true)))
&& e.Item != null && e.Target != null && _validationSummary.Errors.Contains(e.Item))
{
DataGridCell cell = e.Target.Control as DataGridCell;
if (cell != null && cell.OwningGrid == this && cell.OwningColumn != null && cell.OwningColumn.IsVisible)
{
DiagnosticsDebug.Assert(cell.ColumnIndex >= 0 && cell.ColumnIndex < this.ColumnsInternal.Count);
// Begin editing the next relevant cell
UpdateSelectionAndCurrency(cell.ColumnIndex, this.EditingRow.Slot, DataGridSelectionAction.None, true /*scrollIntoView*/);
if (_successfullyUpdatedSelection)
{
BeginCellEdit(new RoutedEventArgs());
if (!IsColumnDisplayed(this.CurrentColumnIndex))
{
ScrollColumnIntoView(this.CurrentColumnIndex);
}
}
}
e.Handled = true;
}
}
/// <summary>
/// Handles the ValidationSummary's SelectionChanged event and changes which cells are displayed as invalid.
/// </summary>
/// <param name="sender">ValidationSummary</param>
/// <param name="e">SelectionChangedEventArgs</param>
private void ValidationSummary_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
// ValidationSummary only supports single-selection mode.
if (e.AddedItems.Count == 1)
{
_selectedValidationSummaryItem = e.AddedItems[0] as ValidationSummaryItem;
}
this.UpdateValidationStatus();
}
#endif
// Recursively expands parent RowGroupHeaders from the top down
private void ExpandRowGroupParentChain(int level, int slot)
{
if (level < 0)
{
return;
}
int previousHeaderSlot = this.RowGroupHeadersTable.GetPreviousIndex(slot + 1);
while (previousHeaderSlot >= 0)
{
DataGridRowGroupInfo rowGroupInfo = this.RowGroupHeadersTable.GetValueAt(previousHeaderSlot);
DiagnosticsDebug.Assert(rowGroupInfo != null, "Expected non-null rowGroupInfo.");
if (level == rowGroupInfo.Level)
{
if (_collapsedSlotsTable.Contains(rowGroupInfo.Slot))
{
// Keep going up the chain
ExpandRowGroupParentChain(level - 1, rowGroupInfo.Slot - 1);
}
if (rowGroupInfo.Visibility != Visibility.Visible)
{
EnsureRowGroupVisibility(rowGroupInfo, Visibility.Visible, false);
}
return;
}
else
{
previousHeaderSlot = this.RowGroupHeadersTable.GetPreviousIndex(previousHeaderSlot);
}
}
}
#if FEATURE_VALIDATION_SUMMARY
/// <summary>
/// Searches through the DataGrid's ValidationSummary for any errors that use the given
/// ValidationResult as the ValidationSummaryItem's Context value.
/// </summary>
/// <param name="context">ValidationResult</param>
/// <returns>ValidationSummaryItem or null if not found</returns>
private ValidationSummaryItem FindValidationSummaryItem(ValidationResult context)
{
DiagnosticsDebug.Assert(context != null);
DiagnosticsDebug.Assert(_validationSummary != null);
foreach (ValidationSummaryItem ValidationSummaryItem in _validationSummary.Errors)
{
if (context.Equals(ValidationSummaryItem.Context))
{
return ValidationSummaryItem;
}
}
return null;
}
#endif
private void InvalidateCellsArrange()
{
foreach (DataGridRow row in GetAllRows())
{
row.InvalidateHorizontalArrange();
}
}
private void InvalidateColumnHeadersArrange()
{
if (_columnHeadersPresenter != null)
{
_columnHeadersPresenter.InvalidateArrange();
}
}
private void InvalidateColumnHeadersMeasure()
{
if (_columnHeadersPresenter != null)
{
EnsureColumnHeadersVisibility();
_columnHeadersPresenter.InvalidateMeasure();
}
}
private void InvalidateRowsArrange()
{
if (_rowsPresenter != null)
{
_rowsPresenter.InvalidateArrange();
}
}
private void InvalidateRowsMeasure(bool invalidateIndividualElements)
{
if (_rowsPresenter != null)
{
_rowsPresenter.InvalidateMeasure();
if (invalidateIndividualElements)
{
foreach (UIElement element in _rowsPresenter.Children)
{
element.InvalidateMeasure();
}
}
}
}
private void DataGrid_GettingFocus(UIElement sender, GettingFocusEventArgs e)
{
_focusInputDevice = e.InputDevice;
}
private void DataGrid_GotFocus(object sender, RoutedEventArgs e)
{
if (!this.ContainsFocus)
{
this.ContainsFocus = true;
ApplyDisplayedRowsState(this.DisplayData.FirstScrollingSlot, this.DisplayData.LastScrollingSlot);
if (this.CurrentColumnIndex != -1 && this.IsSlotVisible(this.CurrentSlot))
{
UpdateCurrentState(this.DisplayData.GetDisplayedElement(this.CurrentSlot), this.CurrentColumnIndex, true /*applyCellState*/);
}
}
DependencyObject focusedElement = e.OriginalSource as DependencyObject;
_focusedObject = focusedElement;
while (focusedElement != null)
{
// Keep track of which row contains the newly focused element
var focusedRow = focusedElement as DataGridRow;
if (focusedRow != null && focusedRow.OwningGrid == this && _focusedRow != focusedRow)
{
ResetFocusedRow();
_focusedRow = focusedRow.Visibility == Visibility.Visible ? focusedRow : null;
break;
}
focusedElement = VisualTreeHelper.GetParent(focusedElement);
}
_preferMouseIndicators = _focusInputDevice == FocusInputDeviceKind.Mouse || _focusInputDevice == FocusInputDeviceKind.Pen;
ShowScrollBars();
// If the DataGrid itself got focus, we actually want the automation focus to be on the current element
if (e.OriginalSource == this && AutomationPeer.ListenerExists(AutomationEvents.AutomationFocusChanged))
{
DataGridAutomationPeer peer = DataGridAutomationPeer.FromElement(this) as DataGridAutomationPeer;
if (peer != null)
{
peer.RaiseAutomationFocusChangedEvent(this.CurrentSlot, this.CurrentColumnIndex);
}
}
}
private void DataGrid_IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)
{
UpdateDisabledVisual();
if (!this.IsEnabled)
{
HideScrollBars(true /*useTransitions*/);
}
}
private void DataGrid_KeyDown(object sender, KeyRoutedEventArgs e)
{
if (!e.Handled)
{
e.Handled = ProcessDataGridKey(e);
this.LastHandledKeyDown = e.Handled ? e.Key : VirtualKey.None;
}
}
private void DataGrid_KeyUp(object sender, KeyRoutedEventArgs e)
{
if (e.Key == VirtualKey.Tab && e.OriginalSource == this)
{
if (this.CurrentColumnIndex == -1)
{
if (this.ColumnHeaders != null && this.AreColumnHeadersVisible && !this.ColumnHeaderHasFocus)
{
this.ColumnHeaderHasFocus = true;
}
}
else
{
if (this.ColumnHeaders != null && this.AreColumnHeadersVisible)
{
KeyboardHelper.GetMetaKeyState(out _, out var shift);
if (shift && this.LastHandledKeyDown != VirtualKey.Tab)
{
DiagnosticsDebug.Assert(!this.ColumnHeaderHasFocus, "Expected ColumnHeaderHasFocus is false.");
// Show currency on the current column's header as focus is entering the DataGrid backwards.
this.ColumnHeaderHasFocus = true;
}
}
bool success = ScrollSlotIntoView(this.CurrentColumnIndex, this.CurrentSlot, false /*forCurrentCellChange*/, true /*forceHorizontalScroll*/);
DiagnosticsDebug.Assert(success, "Expected ScrollSlotIntoView returns true.");
if (this.CurrentColumnIndex != -1 && this.SelectedItem == null)
{
SetRowSelection(this.CurrentSlot, true /*isSelected*/, true /*setAnchorSlot*/);
}
}
}
}
private void DataGrid_LostFocus(object sender, RoutedEventArgs e)
{
_focusedObject = null;
if (this.ContainsFocus)
{
bool focusLeftDataGrid = true;
bool dataGridWillReceiveRoutedEvent = true;
DataGridColumn editingColumn = null;
// Walk up the visual tree of the newly focused element
// to determine if focus is still within DataGrid.
object focusedObject = GetFocusedElement();
DependencyObject focusedDependencyObject = focusedObject as DependencyObject;
while (focusedDependencyObject != null)
{
if (focusedDependencyObject == this)
{
focusLeftDataGrid = false;
break;
}
// Walk up the visual tree. Try using the framework element's
// parent. We do this because Popups behave differently with respect to the visual tree,
// and it could have a parent even if the VisualTreeHelper doesn't find it.
DependencyObject parent = null;
FrameworkElement element = focusedDependencyObject as FrameworkElement;
if (element == null)
{
parent = VisualTreeHelper.GetParent(focusedDependencyObject);
}
else
{
parent = element.Parent;
if (parent == null)
{
parent = VisualTreeHelper.GetParent(focusedDependencyObject);
}
else
{
dataGridWillReceiveRoutedEvent = false;
}
}
focusedDependencyObject = parent;
}
if (this.EditingRow != null && this.EditingColumnIndex != -1)
{
editingColumn = this.ColumnsItemsInternal[this.EditingColumnIndex];
if (focusLeftDataGrid && editingColumn is DataGridTemplateColumn)
{
dataGridWillReceiveRoutedEvent = false;
}
}
if (focusLeftDataGrid && !(editingColumn is DataGridTemplateColumn))
{
this.ContainsFocus = false;
if (this.EditingRow != null)
{
CommitEdit(DataGridEditingUnit.Row, true /*exitEditingMode*/);
}
ResetFocusedRow();
ApplyDisplayedRowsState(this.DisplayData.FirstScrollingSlot, this.DisplayData.LastScrollingSlot);
if (this.ColumnHeaderHasFocus)
{
this.ColumnHeaderHasFocus = false;
}
else if (this.CurrentColumnIndex != -1 && this.IsSlotVisible(this.CurrentSlot))
{
UpdateCurrentState(this.DisplayData.GetDisplayedElement(this.CurrentSlot), this.CurrentColumnIndex, true /*applyCellState*/);
}
}
else if (!dataGridWillReceiveRoutedEvent)
{
FrameworkElement focusedElement = focusedObject as FrameworkElement;
if (focusedElement != null)
{
focusedElement.LostFocus += new RoutedEventHandler(ExternalEditingElement_LostFocus);
}
}
}
}
private object GetFocusedElement()
{
if (TypeHelper.IsXamlRootAvailable && XamlRoot != null)
{
return FocusManager.GetFocusedElement(XamlRoot);
}
else
{
return FocusManager.GetFocusedElement();
}
}
private void DataGrid_PointerEntered(object sender, PointerRoutedEventArgs e)
{
if (e.Pointer.PointerDeviceType != PointerDeviceType.Touch)
{
// Mouse/Pen inputs dominate. If touch panning indicators are shown, switch to mouse indicators.
_preferMouseIndicators = true;
ShowScrollBars();
}
}
private void DataGrid_PointerExited(object sender, PointerRoutedEventArgs e)
{
if (e.Pointer.PointerDeviceType != PointerDeviceType.Touch)
{
// Mouse/Pen inputs dominate. If touch panning indicators are shown, switch to mouse indicators.
_isPointerOverHorizontalScrollBar = false;
_isPointerOverVerticalScrollBar = false;
_preferMouseIndicators = true;
ShowScrollBars();
HideScrollBarsAfterDelay();
}
}
private void DataGrid_PointerMoved(object sender, PointerRoutedEventArgs e)
{
// Don't process if this is a generated replay of the event.
if (e.IsGenerated)
{
return;
}
if (e.Pointer.PointerDeviceType != PointerDeviceType.Touch)
{
// Mouse/Pen inputs dominate. If touch panning indicators are shown, switch to mouse indicators.
_preferMouseIndicators = true;
ShowScrollBars();
if (!UISettingsHelper.AreSettingsEnablingAnimations &&
_hideScrollBarsTimer != null &&
(_isPointerOverHorizontalScrollBar || _isPointerOverVerticalScrollBar))
{
StopHideScrollBarsTimer();
}
}
}
private void DataGrid_PointerPressed(object sender, PointerRoutedEventArgs e)
{
if (e.Handled)
{
return;
}
// Show the scroll bars as soon as a pointer is pressed on the DataGrid.
ShowScrollBars();
}
private void DataGrid_PointerReleased(object sender, PointerRoutedEventArgs e)
{
if (this.CurrentColumnIndex != -1 && this.CurrentSlot != -1)
{
e.Handled = true;
}
}
private void DataGrid_Unloaded(object sender, RoutedEventArgs e)
{
_showingMouseIndicators = false;
_keepScrollBarsShowing = false;
}
#if FEATURE_VALIDATION
private void EditingElement_BindingValidationError(object sender, ValidationErrorEventArgs e)
{
if (e.Action == ValidationErrorEventAction.Added && e.Error.Exception != null && e.Error.ErrorContent != null)
{
ValidationResult validationResult = new ValidationResult(e.Error.ErrorContent.ToString(), new List<string>() { _updateSourcePath });
_bindingValidationResults.AddIfNew(validationResult);
}
}
#endif
private void EditingElement_Loaded(object sender, RoutedEventArgs e)
{
FrameworkElement element = sender as FrameworkElement;
if (element != null)
{
element.Loaded -= new RoutedEventHandler(EditingElement_Loaded);
}
PreparingCellForEditPrivate(element);
}
private bool EndCellEdit(DataGridEditAction editAction, bool exitEditingMode, bool keepFocus, bool raiseEvents)
{
if (_editingColumnIndex == -1)
{
return true;
}
DiagnosticsDebug.Assert(this.EditingRow != null, "Expected non-null EditingRow.");
DiagnosticsDebug.Assert(this.EditingRow.Slot == this.CurrentSlot, "Expected EditingRow.Slot equals CurrentSlot.");
DiagnosticsDebug.Assert(_editingColumnIndex >= 0, "Expected positive _editingColumnIndex.");
DiagnosticsDebug.Assert(_editingColumnIndex < this.ColumnsItemsInternal.Count, "Expected _editingColumnIndex smaller than this.ColumnsItemsInternal.Count.");
DiagnosticsDebug.Assert(_editingColumnIndex == this.CurrentColumnIndex, "Expected _editingColumnIndex equals this.CurrentColumnIndex.");
// Cache these to see if they change later
int currentSlot = this.CurrentSlot;
int currentColumnIndex = this.CurrentColumnIndex;
// We're ready to start ending, so raise the event
DataGridCell editingCell = this.EditingRow.Cells[_editingColumnIndex];
FrameworkElement editingElement = editingCell.Content as FrameworkElement;
if (editingElement == null)
{
return false;
}
if (raiseEvents)
{
DataGridCellEditEndingEventArgs e = new DataGridCellEditEndingEventArgs(this.CurrentColumn, this.EditingRow, editingElement, editAction);
OnCellEditEnding(e);
if (e.Cancel)
{
// CellEditEnding has been canceled
return false;
}
// Ensure that the current cell wasn't changed in the user's CellEditEnding handler
if (_editingColumnIndex == -1 ||
currentSlot != this.CurrentSlot ||
currentColumnIndex != this.CurrentColumnIndex)
{
return true;
}
DiagnosticsDebug.Assert(this.EditingRow != null, "Expected non-null EditingRow.");
DiagnosticsDebug.Assert(this.EditingRow.Slot == currentSlot, "Expected EditingRow.Slot equals currentSlot.");
DiagnosticsDebug.Assert(_editingColumnIndex != -1, "Expected _editingColumnIndex other than -1.");
DiagnosticsDebug.Assert(_editingColumnIndex == this.CurrentColumnIndex, "Expected _editingColumnIndex equals CurrentColumnIndex.");
}
_bindingValidationResults.Clear();
// If we're canceling, let the editing column repopulate its old value if it wants
if (editAction == DataGridEditAction.Cancel)
{
this.CurrentColumn.CancelCellEditInternal(editingElement, _uneditedValue);
// Ensure that the current cell wasn't changed in the user column's CancelCellEdit
if (_editingColumnIndex == -1 ||
currentSlot != this.CurrentSlot ||
currentColumnIndex != this.CurrentColumnIndex)
{
return true;
}
DiagnosticsDebug.Assert(this.EditingRow != null, "Expected non-null EditingRow.");
DiagnosticsDebug.Assert(this.EditingRow.Slot == currentSlot, "Expected EditingRow.Slot equals currentSlot.");
DiagnosticsDebug.Assert(_editingColumnIndex != -1, "Expected _editingColumnIndex other than -1.");
DiagnosticsDebug.Assert(_editingColumnIndex == this.CurrentColumnIndex, "Expected _editingColumnIndex equals CurrentColumnIndex.");
// Re-validate
this.ValidateEditingRow(true /*scrollIntoView*/, false /*wireEvents*/);
}
// If we're committing, explicitly update the source but watch out for any validation errors
if (editAction == DataGridEditAction.Commit)
{
foreach (BindingInfo bindingData in this.CurrentColumn.GetInputBindings(editingElement, this.CurrentItem))
{
DiagnosticsDebug.Assert(bindingData.BindingExpression.ParentBinding != null, "Expected non-null bindingData.BindingExpression.ParentBinding.");
_updateSourcePath = bindingData.BindingExpression.ParentBinding.Path != null ? bindingData.BindingExpression.ParentBinding.Path.Path : null;
#if FEATURE_VALIDATION
bindingData.Element.BindingValidationError += new EventHandler<ValidationErrorEventArgs>(EditingElement_BindingValidationError);
#endif
try
{
bindingData.BindingExpression.UpdateSource();
}
finally
{
#if FEATURE_VALIDATION
bindingData.Element.BindingValidationError -= new EventHandler<ValidationErrorEventArgs>(EditingElement_BindingValidationError);
#endif
}
}
// Re-validate
this.ValidateEditingRow(true /*scrollIntoView*/, false /*wireEvents*/);
if (_bindingValidationResults.Count > 0)
{
ScrollSlotIntoView(this.CurrentColumnIndex, this.CurrentSlot, false /*forCurrentCellChange*/, true /*forceHorizontalScroll*/);
return false;
}
}
if (exitEditingMode)
{
_editingColumnIndex = -1;
editingCell.ApplyCellState(true /*animate*/);
// TODO: Figure out if we should restore a cached this.IsTabStop.
this.IsTabStop = true;
if (keepFocus && editingElement.ContainsFocusedElement(this))
{
this.Focus(FocusState.Programmatic);
}
PopulateCellContent(!exitEditingMode /*isCellEdited*/, this.CurrentColumn, this.EditingRow, editingCell);
}
// We're done, so raise the CellEditEnded event
if (raiseEvents)
{
OnCellEditEnded(new DataGridCellEditEndedEventArgs(this.CurrentColumn, this.EditingRow, editAction));
}
// There's a chance that somebody reopened this cell for edit within the CellEditEnded handler,
// so we should return false if we were supposed to exit editing mode, but we didn't
return !(exitEditingMode && currentColumnIndex == _editingColumnIndex);
}
private bool EndRowEdit(DataGridEditAction editAction, bool exitEditingMode, bool raiseEvents)
{
// Explicit row end edit has been triggered, so we can no longer be initializing a new item.
_initializingNewItem = false;
if (this.EditingRow == null || this.DataConnection.EndingEdit)
{
return true;
}
if (_editingColumnIndex != -1 || (editAction == DataGridEditAction.Cancel && raiseEvents &&
!(this.DataConnection.CanCancelEdit || this.EditingRow.DataContext is IEditableObject || this.DataConnection.IsAddingNew)))
{
// Ending the row edit will fail immediately under the following conditions:
// 1. We haven't ended the cell edit yet.
// 2. We're trying to cancel edit when the underlying DataType is not an IEditableObject,
// because we have no way to properly restore the old value. We will only allow this to occur if:
// a. raiseEvents == false, which means we're internally forcing a cancel or
// b. we're canceling a new item addition.
return false;
}
DataGridRow editingRow = this.EditingRow;
if (raiseEvents)
{
DataGridRowEditEndingEventArgs e = new DataGridRowEditEndingEventArgs(this.EditingRow, editAction);
OnRowEditEnding(e);
if (e.Cancel)
{
// RowEditEnding has been canceled
return false;
}
// Editing states might have been changed in the RowEditEnding handlers
if (_editingColumnIndex != -1)
{
return false;
}
if (editingRow != this.EditingRow)
{
return true;
}
}
// Call the appropriate commit or cancel methods
if (editAction == DataGridEditAction.Commit)
{
if (!CommitRowEdit(exitEditingMode))
{
return false;
}
}
else
{
if (!CancelRowEdit(exitEditingMode) && raiseEvents)
{
// We failed to cancel edit so we should abort unless we're forcing a cancel
return false;
}
}
ResetValidationStatus();
// Update the previously edited row's state
if (exitEditingMode && editingRow == this.EditingRow)
{
// Unwire the INDEI event handlers
foreach (INotifyDataErrorInfo indei in _validationItems.Keys)
{
indei.ErrorsChanged -= new EventHandler<DataErrorsChangedEventArgs>(ValidationItem_ErrorsChanged);
}
_validationItems.Clear();
this.RemoveEditingElements();
ResetEditingRow();
}
if (this.CurrentSlot == -1 && this.DataConnection.CollectionView != null && this.DataConnection.CollectionView.CurrentItem != null)
{
// Some EditableCollectionViews (ListCollectionView in particular) do not raise CurrentChanged when CommitEdit
// changes the position of the CurrentItem. Instead, they raise a PropertyChanged event for PositionChanged.
// We recognize that case here and setup the CurrentItem again if one exists but it was removed and re-added
// during Commit. This is better than reacting to PositionChanged which would double the work in most cases
// and likely introduce regressions.
UpdateStateOnCurrentChanged(this.DataConnection.CollectionView.CurrentItem, this.DataConnection.CollectionView.CurrentPosition);
}
// Raise the RowEditEnded event
if (raiseEvents)
{
OnRowEditEnded(new DataGridRowEditEndedEventArgs(editingRow, editAction));
}
return true;
}
private void EnsureColumnHeadersVisibility()
{
if (_columnHeadersPresenter != null)
{
_columnHeadersPresenter.Visibility = this.AreColumnHeadersVisible ? Visibility.Visible : Visibility.Collapsed;
}
}
private void EnsureVerticalGridLines()
{
if (this.AreColumnHeadersVisible)
{
double totalColumnsWidth = 0;
foreach (DataGridColumn column in this.ColumnsInternal)
{
totalColumnsWidth += column.ActualWidth;
column.HeaderCell.SeparatorVisibility = (column != this.ColumnsInternal.LastVisibleColumn || totalColumnsWidth < this.CellsWidth) ?
Visibility.Visible : Visibility.Collapsed;
}
}
foreach (DataGridRow row in GetAllRows())
{
row.EnsureGridLines();
}
}
/// <summary>
/// Exits editing mode without trying to commit or revert the editing, and
/// without repopulating the edited row's cell.
/// </summary>
private void ExitEdit(bool keepFocus)
{
// We're exiting editing mode, so we can no longer be initializing a new item.
_initializingNewItem = false;
if (this.EditingRow == null || this.DataConnection.EndingEdit)
{
DiagnosticsDebug.Assert(_editingColumnIndex == -1, "Expected _editingColumnIndex equal to -1.");
return;
}
if (_editingColumnIndex != -1)
{
DiagnosticsDebug.Assert(this.EditingRow != null, "Expected non-null EditingRow.");
DiagnosticsDebug.Assert(this.EditingRow.Slot == this.CurrentSlot, "Expected EditingRow.Slot equals CurrentSlot.");
DiagnosticsDebug.Assert(_editingColumnIndex >= 0, "Expected positive _editingColumnIndex.");
DiagnosticsDebug.Assert(_editingColumnIndex < this.ColumnsItemsInternal.Count, "Expected _editingColumnIndex smaller than this.ColumnsItemsInternal.Count.");
DiagnosticsDebug.Assert(_editingColumnIndex == this.CurrentColumnIndex, "Expected _editingColumnIndex equals CurrentColumnIndex.");
_editingColumnIndex = -1;
this.EditingRow.Cells[this.CurrentColumnIndex].ApplyCellState(false /*animate*/);
}
// TODO: Figure out if we should restore a cached this.IsTabStop.
this.IsTabStop = true;
if (this.IsSlotVisible(this.EditingRow.Slot))
{
this.EditingRow.ApplyState(true /*animate*/);
}
ResetEditingRow();
if (keepFocus)
{
bool success = Focus(FocusState.Programmatic);
DiagnosticsDebug.Assert(success, "Expected successful Focus call.");
}
}
private void ExternalEditingElement_LostFocus(object sender, RoutedEventArgs e)
{
FrameworkElement element = sender as FrameworkElement;
if (element != null)
{
element.LostFocus -= new RoutedEventHandler(ExternalEditingElement_LostFocus);
DataGrid_LostFocus(sender, e);
}
}
private void FlushCurrentCellChanged()
{
if (_makeFirstDisplayedCellCurrentCellPending)
{
return;
}
if (this.SelectionHasChanged)
{
// selection is changing, don't raise CurrentCellChanged until it's done
_flushCurrentCellChanged = true;
FlushSelectionChanged();
return;
}
// We don't want to expand all intermediate currency positions, so we only expand
// the last current item before we flush the event
if (_collapsedSlotsTable.Contains(this.CurrentSlot) && this.CurrentSlot != this.SlotFromRowIndex(this.DataConnection.NewItemPlaceholderIndex))
{
DataGridRowGroupInfo rowGroupInfo = this.RowGroupHeadersTable.GetValueAt(this.RowGroupHeadersTable.GetPreviousIndex(this.CurrentSlot));
DiagnosticsDebug.Assert(rowGroupInfo != null, "Expected non-null rowGroupInfo.");
if (rowGroupInfo != null)
{
this.ExpandRowGroupParentChain(rowGroupInfo.Level, rowGroupInfo.Slot);
}
}
if (this.CurrentColumn != _previousCurrentColumn || this.CurrentItem != _previousCurrentItem)
{
this.CoerceSelectedItem();
_previousCurrentColumn = this.CurrentColumn;
_previousCurrentItem = this.CurrentItem;
OnCurrentCellChanged(EventArgs.Empty);
}
DataGridAutomationPeer peer = DataGridAutomationPeer.FromElement(this) as DataGridAutomationPeer;
if (peer != null && this.CurrentCellCoordinates != _previousAutomationFocusCoordinates)
{
_previousAutomationFocusCoordinates = new DataGridCellCoordinates(this.CurrentCellCoordinates);
// If the DataGrid itself has focus, we want to move automation focus to the new current element
object focusedObject = GetFocusedElement();
if (focusedObject == this && AutomationPeer.ListenerExists(AutomationEvents.AutomationFocusChanged))
{
peer.RaiseAutomationFocusChangedEvent(this.CurrentSlot, this.CurrentColumnIndex);
}
}
_flushCurrentCellChanged = false;
}
private void FlushSelectionChanged()
{
if (this.SelectionHasChanged && _noSelectionChangeCount == 0 && !_makeFirstDisplayedCellCurrentCellPending)
{
this.CoerceSelectedItem();
if (this.NoCurrentCellChangeCount != 0)
{
// current cell is changing, don't raise SelectionChanged until it's done
return;
}
this.SelectionHasChanged = false;
if (_flushCurrentCellChanged)
{
FlushCurrentCellChanged();
}
SelectionChangedEventArgs e = _selectedItems.GetSelectionChangedEventArgs();
if (e.AddedItems.Count > 0 || e.RemovedItems.Count > 0)
{
OnSelectionChanged(e);
}
}
}
private bool FocusEditingCell(bool setFocus)
{
DiagnosticsDebug.Assert(this.CurrentColumnIndex >= 0, "Expected positive CurrentColumnIndex.");
DiagnosticsDebug.Assert(this.CurrentColumnIndex < this.ColumnsItemsInternal.Count, "Expected CurrentColumnIndex smaller than ColumnsItemsInternal.Count.");
DiagnosticsDebug.Assert(this.CurrentSlot >= -1, "Expected CurrentSlot greater than or equal to -1.");
DiagnosticsDebug.Assert(this.CurrentSlot < this.SlotCount, "Expected CurrentSlot smaller than SlotCount.");
DiagnosticsDebug.Assert(this.EditingRow != null, "Expected non-null EditingRow.");
DiagnosticsDebug.Assert(this.EditingRow.Slot == this.CurrentSlot, "Expected EditingRow.Slot equals CurrentSlot.");
DiagnosticsDebug.Assert(_editingColumnIndex != -1, "Expected _editingColumnIndex other than -1.");
// TODO: Figure out if we should cache this.IsTabStop in order to restore
// it later instead of setting it back to true unconditionally.
this.IsTabStop = false;
_focusEditingControl = false;
bool success = false;
DataGridCell dataGridCell = this.EditingRow.Cells[_editingColumnIndex];
if (setFocus)
{
if (dataGridCell.ContainsFocusedElement(this))
{
success = true;
}
else
{
success = dataGridCell.Focus(FocusState.Programmatic);
}
_focusEditingControl = !success;
}
return success;
}
/// <summary>
/// This method formats a row (specified by a DataGridRowClipboardEventArgs) into
/// a single string to be added to the Clipboard when the DataGrid is copying its contents.
/// </summary>
/// <param name="e">DataGridRowClipboardEventArgs</param>
/// <returns>The formatted string.</returns>
private string FormatClipboardContent(DataGridRowClipboardEventArgs e)
{
StringBuilder text = new StringBuilder();
for (int cellIndex = 0; cellIndex < e.ClipboardRowContent.Count; cellIndex++)
{
DataGridClipboardCellContent cellContent = e.ClipboardRowContent[cellIndex];
if (cellContent != null)
{
text.Append(cellContent.Content);
}
if (cellIndex < e.ClipboardRowContent.Count - 1)
{
text.Append('\t');
}
else
{
text.Append('\r');
text.Append('\n');
}
}
return text.ToString();
}
// Calculates the amount to scroll for the ScrollLeft button
// This is a method rather than a property to emphasize a calculation
private double GetHorizontalSmallScrollDecrease()
{
// If the first column is covered up, scroll to the start of it when the user clicks the left button
if (_negHorizontalOffset > 0)
{
return _negHorizontalOffset;
}
else
{
// The entire first column is displayed, show the entire previous column when the user clicks
// the left button
DataGridColumn previousColumn = this.ColumnsInternal.GetPreviousVisibleScrollingColumn(
this.ColumnsItemsInternal[DisplayData.FirstDisplayedScrollingCol]);
if (previousColumn != null)
{
return GetEdgedColumnWidth(previousColumn);
}
else
{
// There's no previous column so don't move
return 0;
}
}
}
// Calculates the amount to scroll for the ScrollRight button
// This is a method rather than a property to emphasize a calculation
private double GetHorizontalSmallScrollIncrease()
{
if (this.DisplayData.FirstDisplayedScrollingCol >= 0)
{
return GetEdgedColumnWidth(this.ColumnsItemsInternal[DisplayData.FirstDisplayedScrollingCol]) - _negHorizontalOffset;
}
return 0;
}
// Calculates the amount the ScrollDown button should scroll
// This is a method rather than a property to emphasize that calculations are taking place
private double GetVerticalSmallScrollIncrease()
{
if (this.DisplayData.FirstScrollingSlot >= 0)
{
return GetExactSlotElementHeight(this.DisplayData.FirstScrollingSlot) - this.NegVerticalOffset;
}
return 0;
}
private void HideScrollBars(bool useTransitions)
{
if (!_keepScrollBarsShowing)
{
_proposedScrollBarsState = ScrollBarVisualState.NoIndicator;
_proposedScrollBarsSeparatorState = UISettingsHelper.AreSettingsEnablingAnimations ? ScrollBarsSeparatorVisualState.SeparatorCollapsed : ScrollBarsSeparatorVisualState.SeparatorCollapsedWithoutAnimation;
if (UISettingsHelper.AreSettingsAutoHidingScrollBars)
{
SwitchScrollBarsVisualStates(_proposedScrollBarsState, _proposedScrollBarsSeparatorState, useTransitions);
}
}
}
private void HideScrollBarsAfterDelay()
{
if (!_keepScrollBarsShowing)
{
DispatcherQueueTimer hideScrollBarsTimer = null;
if (_hideScrollBarsTimer != null)
{
hideScrollBarsTimer = _hideScrollBarsTimer;
if (hideScrollBarsTimer.IsRunning)
{
hideScrollBarsTimer.Stop();
}
}
else
{
hideScrollBarsTimer = DispatcherQueue.GetForCurrentThread().CreateTimer();
hideScrollBarsTimer.Interval = TimeSpan.FromMilliseconds(DATAGRID_noScrollBarCountdownMs);
hideScrollBarsTimer.Tick += HideScrollBarsTimerTick;
_hideScrollBarsTimer = hideScrollBarsTimer;
}
hideScrollBarsTimer.Start();
}
}
private void HideScrollBarsTimerTick(object sender, object e)
{
StopHideScrollBarsTimer();
HideScrollBars(true /*useTransitions*/);
}
private void HookDataGridEvents()
{
this.IsEnabledChanged += new DependencyPropertyChangedEventHandler(DataGrid_IsEnabledChanged);
this.KeyDown += new KeyEventHandler(DataGrid_KeyDown);
this.KeyUp += new KeyEventHandler(DataGrid_KeyUp);
this.GettingFocus += new TypedEventHandler<UIElement, GettingFocusEventArgs>(DataGrid_GettingFocus);
this.GotFocus += new RoutedEventHandler(DataGrid_GotFocus);
this.LostFocus += new RoutedEventHandler(DataGrid_LostFocus);
this.PointerEntered += new PointerEventHandler(DataGrid_PointerEntered);
this.PointerExited += new PointerEventHandler(DataGrid_PointerExited);
this.PointerMoved += new PointerEventHandler(DataGrid_PointerMoved);
this.PointerPressed += new PointerEventHandler(DataGrid_PointerPressed);
this.PointerReleased += new PointerEventHandler(DataGrid_PointerReleased);
this.Unloaded += new RoutedEventHandler(DataGrid_Unloaded);
}
private void HookHorizontalScrollBarEvents()
{
if (_hScrollBar != null)
{
_hScrollBar.Scroll += new ScrollEventHandler(HorizontalScrollBar_Scroll);
_hScrollBar.PointerEntered += new PointerEventHandler(HorizontalScrollBar_PointerEntered);
_hScrollBar.PointerExited += new PointerEventHandler(HorizontalScrollBar_PointerExited);
}
}
private void HookVerticalScrollBarEvents()
{
if (_vScrollBar != null)
{
_vScrollBar.Scroll += new ScrollEventHandler(VerticalScrollBar_Scroll);
_vScrollBar.PointerEntered += new PointerEventHandler(VerticalScrollBar_PointerEntered);
_vScrollBar.PointerExited += new PointerEventHandler(VerticalScrollBar_PointerExited);
}
}
private void HorizontalScrollBar_PointerEntered(object sender, PointerRoutedEventArgs e)
{
_isPointerOverHorizontalScrollBar = true;
if (!UISettingsHelper.AreSettingsEnablingAnimations)
{
HideScrollBarsAfterDelay();
}
}
private void HorizontalScrollBar_PointerExited(object sender, PointerRoutedEventArgs e)
{
_isPointerOverHorizontalScrollBar = false;
HideScrollBarsAfterDelay();
}
private void VerticalScrollBar_PointerEntered(object sender, PointerRoutedEventArgs e)
{
_isPointerOverVerticalScrollBar = true;
if (!UISettingsHelper.AreSettingsEnablingAnimations)
{
HideScrollBarsAfterDelay();
}
}
private void VerticalScrollBar_PointerExited(object sender, PointerRoutedEventArgs e)
{
_isPointerOverVerticalScrollBar = false;
HideScrollBarsAfterDelay();
}
private void HorizontalScrollBar_Scroll(object sender, ScrollEventArgs e)
{
ProcessHorizontalScroll(e.ScrollEventType);
}
private void IndicatorStateStoryboard_Completed(object sender, object e)
{
// If the cursor is currently directly over either scroll bar then do not automatically hide the indicators.
if (!_keepScrollBarsShowing &&
!_isPointerOverVerticalScrollBar &&
!_isPointerOverHorizontalScrollBar)
{
// Go to the NoIndicator state using transitions.
if (UISettingsHelper.AreSettingsEnablingAnimations)
{
// By default there is a delay before the NoIndicator state actually shows.
HideScrollBars(true /*useTransitions*/);
}
else
{
// Since OS animations are turned off, use a timer to delay the scroll bars' hiding.
HideScrollBarsAfterDelay();
}
}
}
private bool IsColumnOutOfBounds(int columnIndex)
{
return columnIndex >= this.ColumnsItemsInternal.Count || columnIndex < 0;
}
private bool IsInnerCellOutOfBounds(int columnIndex, int slot)
{
return IsColumnOutOfBounds(columnIndex) || IsSlotOutOfBounds(slot);
}
private bool IsInnerCellOutOfSelectionBounds(int columnIndex, int slot)
{
return IsColumnOutOfBounds(columnIndex) || IsSlotOutOfSelectionBounds(slot);
}
private bool IsSlotOutOfBounds(int slot)
{
return slot >= this.SlotCount || slot < -1 || _collapsedSlotsTable.Contains(slot);
}
private bool IsSlotOutOfSelectionBounds(int slot)
{
if (this.RowGroupHeadersTable.Contains(slot))
{
DiagnosticsDebug.Assert(slot >= 0, "Expected positive slot.");
DiagnosticsDebug.Assert(slot < this.SlotCount, "Expected slot smaller than this.SlotCount.");
return false;
}
else
{
int rowIndex = RowIndexFromSlot(slot);
return rowIndex < 0 || rowIndex >= this.DataConnection.Count;
}
}
private void LoadMoreDataFromIncrementalItemsSource(double totalVisibleHeight)
{
if (IncrementalLoadingTrigger == IncrementalLoadingTrigger.Edge && DataConnection.IsDataSourceIncremental && DataConnection.HasMoreItems && !DataConnection.IsLoadingMoreItems)
{
var bottomScrolledOffHeight = Math.Max(0, totalVisibleHeight - CellsHeight - VerticalOffset);
if ((IncrementalLoadingThreshold * CellsHeight) >= bottomScrolledOffHeight)
{
var numberOfRowsToLoad = Math.Max(1, (int)(DataFetchSize * CellsHeight / RowHeightEstimate));
DataConnection.LoadMoreItems((uint)numberOfRowsToLoad);
}
}
}
private void MakeFirstDisplayedCellCurrentCell()
{
if (this.CurrentColumnIndex != -1)
{
_makeFirstDisplayedCellCurrentCellPending = false;
_desiredCurrentColumnIndex = -1;
this.FlushCurrentCellChanged();
return;
}
if (this.SlotCount != SlotFromRowIndex(this.DataConnection.Count))
{
_makeFirstDisplayedCellCurrentCellPending = true;
return;
}
// No current cell, therefore no selection either - try to set the current cell to the
// ItemsSource's ICollectionView.CurrentItem if it exists, otherwise use the first displayed cell.
int slot;
if (this.DataConnection.CollectionView != null)
{
if (this.DataConnection.CollectionView.IsCurrentBeforeFirst ||
this.DataConnection.CollectionView.IsCurrentAfterLast)
{
slot = this.RowGroupHeadersTable.Contains(0) ? 0 : -1;
}
else
{
slot = SlotFromRowIndex(this.DataConnection.CollectionView.CurrentPosition);
}
}
else
{
if (this.SelectedIndex == -1)
{
// Try to default to the first row
slot = SlotFromRowIndex(0);
if (!this.IsSlotVisible(slot))
{
slot = -1;
}
}
else
{
slot = SlotFromRowIndex(this.SelectedIndex);
}
}
int columnIndex = this.FirstDisplayedNonFillerColumnIndex;
if (_desiredCurrentColumnIndex >= 0 && _desiredCurrentColumnIndex < this.ColumnsItemsInternal.Count)
{
columnIndex = _desiredCurrentColumnIndex;
}
SetAndSelectCurrentCell(
columnIndex,
slot,
false /*forceCurrentCellSelection*/);
this.AnchorSlot = slot;
_makeFirstDisplayedCellCurrentCellPending = false;
_desiredCurrentColumnIndex = -1;
FlushCurrentCellChanged();
}
private void NoIndicatorStateStoryboard_Completed(object sender, object e)
{
DiagnosticsDebug.Assert(_hasNoIndicatorStateStoryboardCompletedHandler, "Expected _hasNoIndicatorStateStoryboardCompletedHandler is true.");
_showingMouseIndicators = false;
}
private void PopulateCellContent(
bool isCellEdited,
DataGridColumn dataGridColumn,
DataGridRow dataGridRow,
DataGridCell dataGridCell)
{
DiagnosticsDebug.Assert(dataGridColumn != null, "Expected non-null dataGridColumn.");
DiagnosticsDebug.Assert(dataGridRow != null, "Expected non-null dataGridRow.");
DiagnosticsDebug.Assert(dataGridCell != null, "Expected non-null dataGridCell.");
FrameworkElement element = null;
DataGridBoundColumn dataGridBoundColumn = dataGridColumn as DataGridBoundColumn;
if (isCellEdited)
{
// Generate EditingElement and apply column style if available
element = dataGridColumn.GenerateEditingElementInternal(dataGridCell, dataGridRow.DataContext);
if (element != null)
{
if (dataGridBoundColumn != null && dataGridBoundColumn.EditingElementStyle != null)
{
element.SetStyleWithType(dataGridBoundColumn.EditingElementStyle);
}
// Subscribe to the new element's events
element.Loaded += new RoutedEventHandler(EditingElement_Loaded);
}
}
else
{
// Generate Element and apply column style if available
element = dataGridColumn.GenerateElementInternal(dataGridCell, dataGridRow.DataContext);
if (element != null)
{
if (dataGridBoundColumn != null && dataGridBoundColumn.ElementStyle != null)
{
element.SetStyleWithType(dataGridBoundColumn.ElementStyle);
}
}
#if FEATURE_VALIDATION
// If we are replacing the editingElement on the cell with the displayElement, and there
// were validation errors present on the editingElement, we need to manually force the
// control to go to the InvalidUnfocused state to support Implicit Styles. The reason
// is because the editingElement is being removed as part of a keystroke, and it will
// leave the visual tree before its state is updated. Since Implicit Styles are
// disabled when an element is removed from the visual tree, the subsequent GoToState fails
// and the editingElement cannot make it to the InvalidUnfocused state. As a result,
// any popups in the InvalidFocused state would stay around incorrectly.
if (this.EditingRow != null && dataGridCell.Content != null)
{
Control control = dataGridCell.Content as Control;
if (control != null && Validation.GetHasError(control))
{
VisualStateManager.GoToState(control, VisualStates.StateInvalidUnfocused, useTransitions: false);
}
}
#endif
}
dataGridCell.Content = element;
}
private void PreparingCellForEditPrivate(FrameworkElement editingElement)
{
if (_editingColumnIndex == -1 ||
this.CurrentColumnIndex == -1 ||
this.EditingRow.Cells[this.CurrentColumnIndex].Content != editingElement)
{
// The current cell has changed since the call to BeginCellEdit, so the fact
// that this element has loaded is no longer relevant
return;
}
DiagnosticsDebug.Assert(this.EditingRow != null, "Expected non-null EditingRow.");
DiagnosticsDebug.Assert(this.EditingRow.Slot == this.CurrentSlot, "Expected EditingRow.Slot equals CurrentSlot.");
DiagnosticsDebug.Assert(_editingColumnIndex >= 0, "Expected positive _editingColumnIndex.");
DiagnosticsDebug.Assert(_editingColumnIndex < this.ColumnsItemsInternal.Count, "Expected _editingColumnIndex smaller than this.ColumnsItemsInternal.Count.");
DiagnosticsDebug.Assert(_editingColumnIndex == this.CurrentColumnIndex, "Expected _editingColumnIndex equals CurrentColumnIndex.");
FocusEditingCell(this.ContainsFocus || _focusEditingControl /*setFocus*/);
// Prepare the cell for editing and raise the PreparingCellForEdit event for all columns
DataGridColumn dataGridColumn = this.CurrentColumn;
_uneditedValue = dataGridColumn.PrepareCellForEditInternal(editingElement, _editingEventArgs);
OnPreparingCellForEdit(new DataGridPreparingCellForEditEventArgs(dataGridColumn, this.EditingRow, _editingEventArgs, editingElement));
}
private bool ProcessAKey()
{
bool ctrl, shift, alt;
KeyboardHelper.GetMetaKeyState(out ctrl, out shift, out alt);
if (ctrl && !shift && !alt && this.SelectionMode == DataGridSelectionMode.Extended)
{
SelectAll();
return true;
}
return false;
}
/// <summary>
/// Handles the case where a 'Copy' key ('C' or 'Insert') has been pressed. If pressed in combination with
/// the control key, and the necessary prerequisites are met, the DataGrid will copy its contents
/// to the Clipboard as text.
/// </summary>
/// <returns>Whether or not the DataGrid handled the key press.</returns>
private bool ProcessCopyKey()
{
bool ctrl, shift, alt;
KeyboardHelper.GetMetaKeyState(out ctrl, out shift, out alt);
if (ctrl &&
!shift &&
!alt &&
this.ClipboardCopyMode != DataGridClipboardCopyMode.None &&
this.SelectedItems.Count > 0 &&
_editingColumnIndex != this.CurrentColumnIndex)
{
StringBuilder textBuilder = new StringBuilder();
if (this.ClipboardCopyMode == DataGridClipboardCopyMode.IncludeHeader)
{
DataGridRowClipboardEventArgs headerArgs = new DataGridRowClipboardEventArgs(null, true);
foreach (DataGridColumn column in this.ColumnsInternal.GetVisibleColumns())
{
headerArgs.ClipboardRowContent.Add(new DataGridClipboardCellContent(null, column, column.Header));
}
this.OnCopyingRowClipboardContent(headerArgs);
textBuilder.Append(FormatClipboardContent(headerArgs));
}
for (int index = 0; index < this.SelectedItems.Count; index++)
{
object item = this.SelectedItems[index];
DataGridRowClipboardEventArgs itemArgs = new DataGridRowClipboardEventArgs(item, false);
foreach (DataGridColumn column in this.ColumnsInternal.GetVisibleColumns())
{
object content = column.GetCellValue(item, column.ClipboardContentBinding);
itemArgs.ClipboardRowContent.Add(new DataGridClipboardCellContent(item, column, content));
}
this.OnCopyingRowClipboardContent(itemArgs);
textBuilder.Append(FormatClipboardContent(itemArgs));
}
string text = textBuilder.ToString();
if (!string.IsNullOrEmpty(text))
{
try
{
DataPackage content = new DataPackage();
content.SetText(text);
Clipboard.SetContent(content);
}
catch (SecurityException)
{
// We will get a SecurityException if the user does not allow access to the clipboard.
}
return true;
}
}
return false;
}
private bool ProcessDataGridKey(KeyRoutedEventArgs e)
{
bool focusDataGrid = false;
switch (e.Key)
{
case VirtualKey.Tab:
return ProcessTabKey(e);
case VirtualKey.Up:
focusDataGrid = ProcessUpKey();
break;
case VirtualKey.Down:
focusDataGrid = ProcessDownKey();
break;
case VirtualKey.PageDown:
focusDataGrid = ProcessNextKey();
break;
case VirtualKey.PageUp:
focusDataGrid = ProcessPriorKey();
break;
case VirtualKey.Left:
focusDataGrid = this.FlowDirection == FlowDirection.LeftToRight ? ProcessLeftKey() : ProcessRightKey();
break;
case VirtualKey.Right:
focusDataGrid = this.FlowDirection == FlowDirection.LeftToRight ? ProcessRightKey() : ProcessLeftKey();
break;
case VirtualKey.F2:
return ProcessF2Key(e);
case VirtualKey.Home:
focusDataGrid = ProcessHomeKey();
break;
case VirtualKey.End:
focusDataGrid = ProcessEndKey();
break;
case VirtualKey.Enter:
focusDataGrid = ProcessEnterKey();
break;
case VirtualKey.Escape:
return ProcessEscapeKey();
case VirtualKey.A:
return ProcessAKey();
case VirtualKey.C:
return ProcessCopyKey();
case VirtualKey.Insert:
return ProcessCopyKey();
case VirtualKey.Space:
return ProcessSpaceKey();
}
if (focusDataGrid && this.IsTabStop)
{
this.Focus(FocusState.Programmatic);
}
return focusDataGrid;
}
private bool ProcessDownKeyInternal(bool shift, bool ctrl)
{
DataGridColumn dataGridColumn = this.ColumnsInternal.FirstVisibleColumn;
int firstVisibleColumnIndex = (dataGridColumn == null) ? -1 : dataGridColumn.Index;
int lastSlot = this.LastVisibleSlot;
if (firstVisibleColumnIndex == -1 || lastSlot == -1)
{
return false;
}
if (this.WaitForLostFocus(() => { this.ProcessDownKeyInternal(shift, ctrl); }))
{
return true;
}
int nextSlot = -1;
if (this.CurrentSlot != -1)
{
nextSlot = this.GetNextVisibleSlot(this.CurrentSlot);
if (nextSlot >= this.SlotCount)
{
nextSlot = -1;
}
}
_noSelectionChangeCount++;
try
{
int desiredSlot;
int columnIndex;
DataGridSelectionAction action;
if (this.ColumnHeaderHasFocus)
{
if (ctrl || shift)
{
return false;
}
if (this.CurrentSlot == this.FirstVisibleSlot)
{
this.ColumnHeaderHasFocus = false;
return true;
}
DiagnosticsDebug.Assert(this.CurrentColumnIndex != -1, "Expected CurrentColumnIndex other than -1.");
desiredSlot = this.FirstVisibleSlot;
columnIndex = this.CurrentColumnIndex;
action = DataGridSelectionAction.SelectCurrent;
}
else if (this.CurrentColumnIndex == -1)
{
desiredSlot = this.FirstVisibleSlot;
columnIndex = firstVisibleColumnIndex;
action = DataGridSelectionAction.SelectCurrent;
}
else if (ctrl)
{
if (shift)
{
// Both Ctrl and Shift
desiredSlot = lastSlot;
columnIndex = this.CurrentColumnIndex;
action = (this.SelectionMode == DataGridSelectionMode.Extended)
? DataGridSelectionAction.SelectFromAnchorToCurrent
: DataGridSelectionAction.SelectCurrent;
}
else
{
// Ctrl without Shift
desiredSlot = lastSlot;
columnIndex = this.CurrentColumnIndex;
action = DataGridSelectionAction.SelectCurrent;
}
}
else
{
if (nextSlot == -1)
{
return true;
}
if (shift)
{
// Shift without Ctrl
desiredSlot = nextSlot;
columnIndex = this.CurrentColumnIndex;
action = DataGridSelectionAction.SelectFromAnchorToCurrent;
}
else
{
// Neither Ctrl nor Shift
desiredSlot = nextSlot;
columnIndex = this.CurrentColumnIndex;
action = DataGridSelectionAction.SelectCurrent;
}
}
UpdateSelectionAndCurrency(columnIndex, desiredSlot, action, true /*scrollIntoView*/);
}
finally
{
this.NoSelectionChangeCount--;
}
return _successfullyUpdatedSelection;
}
private bool ProcessEndKey(bool shift, bool ctrl)
{
DataGridColumn dataGridColumn = this.ColumnsInternal.LastVisibleColumn;
int lastVisibleColumnIndex = (dataGridColumn == null) ? -1 : dataGridColumn.Index;
int firstVisibleSlot = this.FirstVisibleSlot;
int lastVisibleSlot = this.LastVisibleSlot;
if (lastVisibleColumnIndex == -1 || (firstVisibleSlot == -1 && !this.ColumnHeaderHasFocus))
{
return false;
}
if (this.WaitForLostFocus(() => { this.ProcessEndKey(shift, ctrl); }))
{
return true;
}
_noSelectionChangeCount++;
try
{
if (!ctrl)
{
return ProcessRightMost(lastVisibleColumnIndex, firstVisibleSlot);
}
else if (firstVisibleSlot != -1)
{
DataGridSelectionAction action = (shift && this.SelectionMode == DataGridSelectionMode.Extended)
? DataGridSelectionAction.SelectFromAnchorToCurrent
: DataGridSelectionAction.SelectCurrent;
UpdateSelectionAndCurrency(lastVisibleColumnIndex, lastVisibleSlot, action, true /*scrollIntoView*/);
}
}
finally
{
this.NoSelectionChangeCount--;
}
return _successfullyUpdatedSelection;
}
private bool ProcessEnterKey(bool shift, bool ctrl)
{
int oldCurrentSlot = this.CurrentSlot;
if (!ctrl)
{
if (this.ColumnHeaderHasFocus)
{
this.CurrentColumn.HeaderCell.InvokeProcessSort();
return true;
}
else if (this.FirstVisibleSlot != -1 && this.RowGroupHeadersTable.Contains(this.CurrentSlot) && ToggleRowGroup())
{
return true;
}
// If Enter was used by a TextBox, we shouldn't handle the key
TextBox focusedTextBox = GetFocusedElement() as TextBox;
if (focusedTextBox != null && focusedTextBox.AcceptsReturn)
{
return false;
}
if (this.WaitForLostFocus(() => { this.ProcessEnterKey(shift, ctrl); }))
{
return true;
}
// Enter behaves like down arrow - it commits the potential editing and goes down one cell.
if (!ProcessDownKeyInternal(false, ctrl))
{
return false;
}
}
else if (this.WaitForLostFocus(() => { this.ProcessEnterKey(shift, ctrl); }))
{
return true;
}
// Try to commit the potential editing
if (oldCurrentSlot == this.CurrentSlot && EndCellEdit(DataGridEditAction.Commit, true /*exitEditingMode*/, true /*keepFocus*/, true /*raiseEvents*/) && this.EditingRow != null)
{
EndRowEdit(DataGridEditAction.Commit, true /*exitEditingMode*/, true /*raiseEvents*/);
ScrollIntoView(this.CurrentItem, this.CurrentColumn);
}
return true;
}
private bool ProcessEscapeKey()
{
if (this.WaitForLostFocus(() => { this.ProcessEscapeKey(); }))
{
return true;
}
if (_editingColumnIndex != -1)
{
// Revert the potential cell editing and exit cell editing.
EndCellEdit(DataGridEditAction.Cancel, true /*exitEditingMode*/, true /*keepFocus*/, true /*raiseEvents*/);
return true;
}
else if (this.EditingRow != null)
{
// Revert the potential row editing and exit row editing.
EndRowEdit(DataGridEditAction.Cancel, true /*exitEditingMode*/, true /*raiseEvents*/);
return true;
}
return false;
}
private bool ProcessF2Key(KeyRoutedEventArgs e)
{
bool ctrl, shift;
KeyboardHelper.GetMetaKeyState(out ctrl, out shift);
if (!shift && !ctrl &&
_editingColumnIndex == -1 && this.CurrentColumnIndex != -1 && GetRowSelection(this.CurrentSlot) &&
!GetColumnEffectiveReadOnlyState(this.CurrentColumn))
{
if (ScrollSlotIntoView(this.CurrentColumnIndex, this.CurrentSlot, false /*forCurrentCellChange*/, true /*forceHorizontalScroll*/))
{
BeginCellEdit(e);
}
return true;
}
return false;
}
private bool ProcessHomeKey(bool shift, bool ctrl)
{
DataGridColumn dataGridColumn = this.ColumnsInternal.FirstVisibleNonFillerColumn;
int firstVisibleColumnIndex = (dataGridColumn == null) ? -1 : dataGridColumn.Index;
int firstVisibleSlot = this.FirstVisibleSlot;
if (firstVisibleColumnIndex == -1 || (firstVisibleSlot == -1 && !this.ColumnHeaderHasFocus))
{
return false;
}
if (this.WaitForLostFocus(() => { this.ProcessHomeKey(shift, ctrl); }))
{
return true;
}
_noSelectionChangeCount++;
try
{
if (!ctrl)
{
return ProcessLeftMost(firstVisibleColumnIndex, firstVisibleSlot);
}
else if (firstVisibleSlot != -1)
{
DataGridSelectionAction action = (shift && this.SelectionMode == DataGridSelectionMode.Extended)
? DataGridSelectionAction.SelectFromAnchorToCurrent
: DataGridSelectionAction.SelectCurrent;
UpdateSelectionAndCurrency(firstVisibleColumnIndex, firstVisibleSlot, action, true /*scrollIntoView*/);
}
}
finally
{
this.NoSelectionChangeCount--;
}
return _successfullyUpdatedSelection;
}
private bool ProcessLeftKey(bool shift, bool ctrl)
{
DataGridColumn dataGridColumn = this.ColumnsInternal.FirstVisibleNonFillerColumn;
int firstVisibleColumnIndex = (dataGridColumn == null) ? -1 : dataGridColumn.Index;
int firstVisibleSlot = this.FirstVisibleSlot;
if (firstVisibleColumnIndex == -1 || (firstVisibleSlot == -1 && !this.ColumnHeaderHasFocus))
{
return false;
}
if (this.WaitForLostFocus(() => { this.ProcessLeftKey(shift, ctrl); }))
{
return true;
}
int previousVisibleColumnIndex = -1;
if (this.CurrentColumnIndex != -1)
{
dataGridColumn = this.ColumnsInternal.GetPreviousVisibleNonFillerColumn(this.ColumnsItemsInternal[this.CurrentColumnIndex]);
if (dataGridColumn != null)
{
previousVisibleColumnIndex = dataGridColumn.Index;
}
}
DataGridColumn oldFocusedColumn = this.FocusedColumn;
_noSelectionChangeCount++;
try
{
if (ctrl)
{
return ProcessLeftMost(firstVisibleColumnIndex, firstVisibleSlot);
}
else if (firstVisibleSlot != -1 && (!this.RowGroupHeadersTable.Contains(this.CurrentSlot) || this.ColumnHeaderHasFocus))
{
if (this.CurrentColumnIndex == -1)
{
UpdateSelectionAndCurrency(firstVisibleColumnIndex, firstVisibleSlot, DataGridSelectionAction.SelectCurrent, true /*scrollIntoView*/);
}
else
{
if (previousVisibleColumnIndex == -1)
{
return true;
}
_noFocusedColumnChangeCount++;
try
{
UpdateSelectionAndCurrency(previousVisibleColumnIndex, this.CurrentSlot, DataGridSelectionAction.None, true /*scrollIntoView*/);
}
finally
{
_noFocusedColumnChangeCount--;
}
}
}
}
finally
{
this.NoSelectionChangeCount--;
}
if (this.ColumnHeaderHasFocus)
{
if (this.CurrentColumn == null)
{
dataGridColumn = this.ColumnsInternal.GetPreviousVisibleNonFillerColumn(this.FocusedColumn);
if (dataGridColumn != null)
{
this.FocusedColumn = dataGridColumn;
}
}
else
{
this.FocusedColumn = this.CurrentColumn;
}
if (firstVisibleSlot == -1 && this.FocusedColumn != null)
{
ScrollColumnIntoView(this.FocusedColumn.Index);
}
}
bool focusedColumnChanged = this.ColumnHeaderHasFocus && oldFocusedColumn != this.FocusedColumn;
if (focusedColumnChanged)
{
if (oldFocusedColumn != null && oldFocusedColumn.HasHeaderCell)
{
oldFocusedColumn.HeaderCell.ApplyState(true);
}
if (this.FocusedColumn != null && this.FocusedColumn.HasHeaderCell)
{
this.FocusedColumn.HeaderCell.ApplyState(true);
}
}
return focusedColumnChanged || _successfullyUpdatedSelection;
}
// Ctrl Left <==> Home
private bool ProcessLeftMost(int firstVisibleColumnIndex, int firstVisibleSlot)
{
DataGridColumn oldFocusedColumn = this.FocusedColumn;
_noSelectionChangeCount++;
try
{
int desiredSlot;
DataGridSelectionAction action;
if (this.CurrentColumnIndex == -1)
{
desiredSlot = firstVisibleSlot;
action = DataGridSelectionAction.SelectCurrent;
DiagnosticsDebug.Assert(_selectedItems.Count == 0, "Expected _selectedItems.Count equals 0.");
}
else
{
desiredSlot = this.CurrentSlot;
action = DataGridSelectionAction.None;
}
_noFocusedColumnChangeCount++;
try
{
UpdateSelectionAndCurrency(firstVisibleColumnIndex, desiredSlot, action, true /*scrollIntoView*/);
}
finally
{
_noFocusedColumnChangeCount--;
}
}
finally
{
this.NoSelectionChangeCount--;
}
if (this.ColumnHeaderHasFocus)
{
if (this.CurrentColumn == null)
{
this.FocusedColumn = this.ColumnsInternal.FirstVisibleColumn;
}
else
{
this.FocusedColumn = this.CurrentColumn;
}
if (firstVisibleSlot == -1 && this.FocusedColumn != null)
{
ScrollColumnIntoView(this.FocusedColumn.Index);
}
}
bool focusedColumnChanged = this.ColumnHeaderHasFocus && oldFocusedColumn != this.FocusedColumn;
if (focusedColumnChanged)
{
if (oldFocusedColumn != null && oldFocusedColumn.HasHeaderCell)
{
oldFocusedColumn.HeaderCell.ApplyState(true);
}
if (this.FocusedColumn != null && this.FocusedColumn.HasHeaderCell)
{
this.FocusedColumn.HeaderCell.ApplyState(true);
}
}
return focusedColumnChanged || _successfullyUpdatedSelection;
}
private bool ProcessNextKey(bool shift, bool ctrl)
{
DataGridColumn dataGridColumn = this.ColumnsInternal.FirstVisibleNonFillerColumn;
int firstVisibleColumnIndex = (dataGridColumn == null) ? -1 : dataGridColumn.Index;
if (firstVisibleColumnIndex == -1 || this.DisplayData.FirstScrollingSlot == -1)
{
return false;
}
if (this.WaitForLostFocus(() => { this.ProcessNextKey(shift, ctrl); }))
{
return true;
}
int nextPageSlot = this.CurrentSlot == -1 ? this.DisplayData.FirstScrollingSlot : this.CurrentSlot;
DiagnosticsDebug.Assert(nextPageSlot != -1, "Expected nextPageSlot other than -1.");
int slot = GetNextVisibleSlot(nextPageSlot);
int scrollCount = this.DisplayData.NumTotallyDisplayedScrollingElements;
while (scrollCount > 0 && slot < this.SlotCount)
{
nextPageSlot = slot;
scrollCount--;
slot = GetNextVisibleSlot(slot);
}
_noSelectionChangeCount++;
try
{
DataGridSelectionAction action;
int columnIndex;
if (this.CurrentColumnIndex == -1)
{
columnIndex = firstVisibleColumnIndex;
action = DataGridSelectionAction.SelectCurrent;
}
else
{
columnIndex = this.CurrentColumnIndex;
action = (shift && this.SelectionMode == DataGridSelectionMode.Extended)
? action = DataGridSelectionAction.SelectFromAnchorToCurrent
: action = DataGridSelectionAction.SelectCurrent;
}
UpdateSelectionAndCurrency(columnIndex, nextPageSlot, action, true /*scrollIntoView*/);
}
finally
{
this.NoSelectionChangeCount--;
}
return _successfullyUpdatedSelection;
}
private bool ProcessPriorKey(bool shift, bool ctrl)
{
DataGridColumn dataGridColumn = this.ColumnsInternal.FirstVisibleNonFillerColumn;
int firstVisibleColumnIndex = (dataGridColumn == null) ? -1 : dataGridColumn.Index;
if (firstVisibleColumnIndex == -1 || this.DisplayData.FirstScrollingSlot == -1)
{
return false;
}
if (this.WaitForLostFocus(() => { this.ProcessPriorKey(shift, ctrl); }))
{
return true;
}
int previousPageSlot = (this.CurrentSlot == -1) ? this.DisplayData.FirstScrollingSlot : this.CurrentSlot;
DiagnosticsDebug.Assert(previousPageSlot != -1, "Expected previousPageSlot other than -1.");
int scrollCount = this.DisplayData.NumTotallyDisplayedScrollingElements;
int slot = GetPreviousVisibleSlot(previousPageSlot);
while (scrollCount > 0 && slot != -1)
{
previousPageSlot = slot;
scrollCount--;
slot = GetPreviousVisibleSlot(slot);
}
DiagnosticsDebug.Assert(previousPageSlot != -1, "Expected previousPageSlot other than -1.");
_noSelectionChangeCount++;
try
{
int columnIndex;
DataGridSelectionAction action;
if (this.CurrentColumnIndex == -1)
{
columnIndex = firstVisibleColumnIndex;
action = DataGridSelectionAction.SelectCurrent;
}
else
{
columnIndex = this.CurrentColumnIndex;
action = (shift && this.SelectionMode == DataGridSelectionMode.Extended)
? DataGridSelectionAction.SelectFromAnchorToCurrent
: DataGridSelectionAction.SelectCurrent;
}
UpdateSelectionAndCurrency(columnIndex, previousPageSlot, action, true /*scrollIntoView*/);
}
finally
{
this.NoSelectionChangeCount--;
}
return _successfullyUpdatedSelection;
}
private bool ProcessRightKey(bool shift, bool ctrl)
{
DataGridColumn dataGridColumn = this.ColumnsInternal.LastVisibleColumn;
int lastVisibleColumnIndex = (dataGridColumn == null) ? -1 : dataGridColumn.Index;
int firstVisibleSlot = this.FirstVisibleSlot;
if (lastVisibleColumnIndex == -1 || (firstVisibleSlot == -1 && !this.ColumnHeaderHasFocus))
{
return false;
}
if (this.WaitForLostFocus(() => { this.ProcessRightKey(shift, ctrl); }))
{
return true;
}
int nextVisibleColumnIndex = -1;
if (this.CurrentColumnIndex != -1)
{
dataGridColumn = this.ColumnsInternal.GetNextVisibleColumn(this.ColumnsItemsInternal[this.CurrentColumnIndex]);
if (dataGridColumn != null)
{
nextVisibleColumnIndex = dataGridColumn.Index;
}
}
DataGridColumn oldFocusedColumn = this.FocusedColumn;
_noSelectionChangeCount++;
try
{
if (ctrl)
{
return ProcessRightMost(lastVisibleColumnIndex, firstVisibleSlot);
}
else if (firstVisibleSlot != -1 && (!this.RowGroupHeadersTable.Contains(this.CurrentSlot) || this.ColumnHeaderHasFocus))
{
if (this.CurrentColumnIndex == -1)
{
int firstVisibleColumnIndex = this.ColumnsInternal.FirstVisibleColumn == null ? -1 : this.ColumnsInternal.FirstVisibleColumn.Index;
UpdateSelectionAndCurrency(firstVisibleColumnIndex, firstVisibleSlot, DataGridSelectionAction.SelectCurrent, true /*scrollIntoView*/);
}
else
{
if (nextVisibleColumnIndex == -1)
{
return true;
}
_noFocusedColumnChangeCount++;
try
{
UpdateSelectionAndCurrency(nextVisibleColumnIndex, this.CurrentSlot, DataGridSelectionAction.None, true /*scrollIntoView*/);
}
finally
{
_noFocusedColumnChangeCount--;
}
}
}
}
finally
{
this.NoSelectionChangeCount--;
}
if (this.ColumnHeaderHasFocus)
{
if (this.CurrentColumn == null)
{
dataGridColumn = this.ColumnsInternal.GetNextVisibleColumn(this.FocusedColumn);
if (dataGridColumn != null)
{
this.FocusedColumn = dataGridColumn;
}
}
else
{
this.FocusedColumn = this.CurrentColumn;
}
if (firstVisibleSlot == -1 && this.FocusedColumn != null)
{
ScrollColumnIntoView(this.FocusedColumn.Index);
}
}
bool focusedColumnChanged = this.ColumnHeaderHasFocus && oldFocusedColumn != this.FocusedColumn;
if (focusedColumnChanged)
{
if (oldFocusedColumn != null && oldFocusedColumn.HasHeaderCell)
{
oldFocusedColumn.HeaderCell.ApplyState(true);
}
if (this.FocusedColumn != null && this.FocusedColumn.HasHeaderCell)
{
this.FocusedColumn.HeaderCell.ApplyState(true);
}
}
return focusedColumnChanged || _successfullyUpdatedSelection;
}
// Ctrl Right <==> End
private bool ProcessRightMost(int lastVisibleColumnIndex, int firstVisibleSlot)
{
DataGridColumn oldFocusedColumn = this.FocusedColumn;
_noSelectionChangeCount++;
try
{
int desiredSlot;
DataGridSelectionAction action;
if (this.CurrentColumnIndex == -1)
{
desiredSlot = firstVisibleSlot;
action = DataGridSelectionAction.SelectCurrent;
}
else
{
desiredSlot = this.CurrentSlot;
action = DataGridSelectionAction.None;
}
_noFocusedColumnChangeCount++;
try
{
UpdateSelectionAndCurrency(lastVisibleColumnIndex, desiredSlot, action, true /*scrollIntoView*/);
}
finally
{
_noFocusedColumnChangeCount--;
}
}
finally
{
this.NoSelectionChangeCount--;
}
if (this.ColumnHeaderHasFocus)
{
if (this.CurrentColumn == null)
{
this.FocusedColumn = this.ColumnsInternal.LastVisibleColumn;
}
else
{
this.FocusedColumn = this.CurrentColumn;
}
if (firstVisibleSlot == -1 && this.FocusedColumn != null)
{
ScrollColumnIntoView(this.FocusedColumn.Index);
}
}
bool focusedColumnChanged = this.ColumnHeaderHasFocus && oldFocusedColumn != this.FocusedColumn;
if (focusedColumnChanged)
{
if (oldFocusedColumn != null && oldFocusedColumn.HasHeaderCell)
{
oldFocusedColumn.HeaderCell.ApplyState(true);
}
if (this.FocusedColumn != null && this.FocusedColumn.HasHeaderCell)
{
this.FocusedColumn.HeaderCell.ApplyState(true);
}
}
return focusedColumnChanged || _successfullyUpdatedSelection;
}
private bool ProcessSpaceKey()
{
return ToggleRowGroup();
}
private bool ProcessTabKey(KeyRoutedEventArgs e)
{
bool ctrl, shift;
KeyboardHelper.GetMetaKeyState(out ctrl, out shift);
return this.ProcessTabKey(e, shift, ctrl);
}
private bool ProcessTabKey(KeyRoutedEventArgs e, bool shift, bool ctrl)
{
if (ctrl || _editingColumnIndex == -1 || this.IsReadOnly)
{
// Go to the next/previous control on the page or the column header when
// - Ctrl key is used
// - Potential current cell is not edited, or the datagrid is read-only.
if (!shift && this.ColumnHeaders != null && this.AreColumnHeadersVisible && !this.ColumnHeaderHasFocus)
{
// Show focus on the current column's header.
this.ColumnHeaderHasFocus = true;
return true;
}
else if (shift && this.ColumnHeaderHasFocus)
{
this.ColumnHeaderHasFocus = false;
return this.CurrentColumnIndex != -1;
}
this.ColumnHeaderHasFocus = false;
return false;
}
// Try to locate a writable cell before/after the current cell
DiagnosticsDebug.Assert(this.CurrentColumnIndex != -1, "Expected CurrentColumnIndex other than -1.");
DiagnosticsDebug.Assert(this.CurrentSlot != -1, "Expected CurrentSlot other than -1.");
int neighborVisibleWritableColumnIndex, neighborSlot;
DataGridColumn dataGridColumn;
if (shift)
{
dataGridColumn = this.ColumnsInternal.GetPreviousVisibleWritableColumn(this.ColumnsItemsInternal[this.CurrentColumnIndex]);
neighborSlot = GetPreviousVisibleSlot(this.CurrentSlot);
if (this.EditingRow != null)
{
while (neighborSlot != -1 && this.RowGroupHeadersTable.Contains(neighborSlot))
{
neighborSlot = GetPreviousVisibleSlot(neighborSlot);
}
}
}
else
{
dataGridColumn = this.ColumnsInternal.GetNextVisibleWritableColumn(this.ColumnsItemsInternal[this.CurrentColumnIndex]);
neighborSlot = GetNextVisibleSlot(this.CurrentSlot);
if (this.EditingRow != null)
{
while (neighborSlot < this.SlotCount && this.RowGroupHeadersTable.Contains(neighborSlot))
{
neighborSlot = GetNextVisibleSlot(neighborSlot);
}
}
}
neighborVisibleWritableColumnIndex = (dataGridColumn == null) ? -1 : dataGridColumn.Index;
if (neighborVisibleWritableColumnIndex == -1 && (neighborSlot == -1 || neighborSlot >= this.SlotCount))
{
// There is no previous/next row and no previous/next writable cell on the current row
return false;
}
if (this.WaitForLostFocus(() => { this.ProcessTabKey(e, shift, ctrl); }))
{
return true;
}
int targetSlot = -1, targetColumnIndex = -1;
_noSelectionChangeCount++;
try
{
if (neighborVisibleWritableColumnIndex == -1)
{
targetSlot = neighborSlot;
if (shift)
{
DiagnosticsDebug.Assert(this.ColumnsInternal.LastVisibleWritableColumn != null, "Expected non-null ColumnsInternal.LastVisibleWritableColumn.");
targetColumnIndex = this.ColumnsInternal.LastVisibleWritableColumn.Index;
}
else
{
DiagnosticsDebug.Assert(this.ColumnsInternal.FirstVisibleWritableColumn != null, "Expected non-null ColumnsInternal.FirstVisibleWritableColumn.");
targetColumnIndex = this.ColumnsInternal.FirstVisibleWritableColumn.Index;
}
}
else
{
targetSlot = this.CurrentSlot;
targetColumnIndex = neighborVisibleWritableColumnIndex;
}
DataGridSelectionAction action;
if (targetSlot != this.CurrentSlot || (this.SelectionMode == DataGridSelectionMode.Extended))
{
if (IsSlotOutOfBounds(targetSlot))
{
return true;
}
action = DataGridSelectionAction.SelectCurrent;
}
else
{
action = DataGridSelectionAction.None;
}
UpdateSelectionAndCurrency(targetColumnIndex, targetSlot, action, true /*scrollIntoView*/);
}
finally
{
this.NoSelectionChangeCount--;
}
if (_successfullyUpdatedSelection && !this.RowGroupHeadersTable.Contains(targetSlot))
{
BeginCellEdit(e);
}
// Return true to say we handled the key event even if the operation was unsuccessful. If we don't
// say we handled this event, the framework will continue to process the tab key and change focus.
return true;
}
private bool ProcessUpKey(bool shift, bool ctrl)
{
DataGridColumn dataGridColumn = this.ColumnsInternal.FirstVisibleNonFillerColumn;
int firstVisibleColumnIndex = (dataGridColumn == null) ? -1 : dataGridColumn.Index;
int firstVisibleSlot = this.FirstVisibleSlot;
if (firstVisibleColumnIndex == -1 || firstVisibleSlot == -1)
{
return false;
}
if (this.WaitForLostFocus(() => { this.ProcessUpKey(shift, ctrl); }))
{
return true;
}
int previousVisibleSlot = (this.CurrentSlot != -1) ? GetPreviousVisibleSlot(this.CurrentSlot) : -1;
_noSelectionChangeCount++;
try
{
int slot;
int columnIndex;
DataGridSelectionAction action;
if (this.CurrentColumnIndex == -1)
{
slot = firstVisibleSlot;
columnIndex = firstVisibleColumnIndex;
action = DataGridSelectionAction.SelectCurrent;
}
else if (ctrl)
{
if (shift)
{
// Both Ctrl and Shift
slot = firstVisibleSlot;
columnIndex = this.CurrentColumnIndex;
action = (this.SelectionMode == DataGridSelectionMode.Extended)
? DataGridSelectionAction.SelectFromAnchorToCurrent
: DataGridSelectionAction.SelectCurrent;
}
else
{
// Ctrl without Shift
slot = firstVisibleSlot;
columnIndex = this.CurrentColumnIndex;
action = DataGridSelectionAction.SelectCurrent;
}
}
else
{
if (previousVisibleSlot == -1)
{
return true;
}
if (shift)
{
// Shift without Ctrl
slot = previousVisibleSlot;
columnIndex = this.CurrentColumnIndex;
action = DataGridSelectionAction.SelectFromAnchorToCurrent;
}
else
{
// Neither Shift nor Ctrl
slot = previousVisibleSlot;
columnIndex = this.CurrentColumnIndex;
action = DataGridSelectionAction.SelectCurrent;
}
}
UpdateSelectionAndCurrency(columnIndex, slot, action, true /*scrollIntoView*/);
}
finally
{
this.NoSelectionChangeCount--;
}
return _successfullyUpdatedSelection;
}
private void RemoveDisplayedColumnHeader(DataGridColumn dataGridColumn)
{
if (_columnHeadersPresenter != null)
{
_columnHeadersPresenter.Children.Remove(dataGridColumn.HeaderCell);
}
}
private void RemoveDisplayedColumnHeaders()
{
if (_columnHeadersPresenter != null)
{
_columnHeadersPresenter.Children.Clear();
}
this.ColumnsInternal.FillerColumn.IsRepresented = false;
}
private bool ResetCurrentCellCore()
{
return this.CurrentColumnIndex == -1 || SetCurrentCellCore(-1, -1);
}
private void ResetEditingRow()
{
DataGridRow oldEditingRow = this.EditingRow;
if (oldEditingRow != null &&
oldEditingRow != _focusedRow &&
!IsSlotVisible(oldEditingRow.Slot))
{
// Unload the old editing row if it's off screen
oldEditingRow.Clip = null;
UnloadRow(oldEditingRow);
this.DisplayData.FullyRecycleElements();
}
this.EditingRow = null;
if (oldEditingRow != null && IsSlotVisible(oldEditingRow.Slot))
{
// If the row is no longer editing, then its visuals need to change.
oldEditingRow.ApplyState(true /*animate*/);
}
}
private void ResetFocusedRow()
{
if (_focusedRow != null &&
_focusedRow != this.EditingRow &&
!IsSlotVisible(_focusedRow.Slot))
{
// Unload the old focused row if it's off screen
_focusedRow.Clip = null;
UnloadRow(_focusedRow);
this.DisplayData.FullyRecycleElements();
}
_focusedRow = null;
}
private void ResetValidationStatus()
{
// Clear the invalid status of the Cell, Row and DataGrid
if (this.EditingRow != null)
{
this.EditingRow.IsValid = true;
if (this.EditingRow.Index != -1)
{
foreach (DataGridCell cell in this.EditingRow.Cells)
{
if (!cell.IsValid)
{
cell.IsValid = true;
cell.ApplyCellState(true);
}
}
this.EditingRow.ApplyState(true);
}
}
this.IsValid = true;
// Clear the previous validation results
_validationResults.Clear();
#if FEATURE_VALIDATION_SUMMARY
// Hide the error list if validation succeeded
if (_validationSummary != null && _validationSummary.Errors.Count > 0)
{
_validationSummary.Errors.Clear();
if (this.EditingRow != null)
{
int editingRowSlot = this.EditingRow.Slot;
InvalidateMeasure();
// TODO: Move to DispatcherQueue when FEATURE_VALIDATION_SUMMARY is enabled
this.Dispatcher.BeginInvoke(() =>
{
// It's possible that the DataContext or ItemsSource has changed by the time we reach this code,
// so we need to ensure that the editing row still exists before scrolling it into view
if (!IsSlotOutOfBounds(editingRowSlot) && editingRowSlot != -1)
{
ScrollSlotIntoView(editingRowSlot, false /*scrolledHorizontally*/);
}
});
}
}
#endif
}
private void RowGroupHeaderStyles_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
if (_rowsPresenter != null)
{
Style oldLastStyle = _rowGroupHeaderStylesOld.Count > 0 ? _rowGroupHeaderStylesOld[_rowGroupHeaderStylesOld.Count - 1] : null;
while (_rowGroupHeaderStylesOld.Count < _rowGroupHeaderStyles.Count)
{
_rowGroupHeaderStylesOld.Add(oldLastStyle);
}
Style lastStyle = _rowGroupHeaderStyles.Count > 0 ? _rowGroupHeaderStyles[_rowGroupHeaderStyles.Count - 1] : null;
foreach (UIElement element in _rowsPresenter.Children)
{
DataGridRowGroupHeader groupHeader = element as DataGridRowGroupHeader;
if (groupHeader != null)
{
Style oldStyle = groupHeader.Level < _rowGroupHeaderStylesOld.Count ? _rowGroupHeaderStylesOld[groupHeader.Level] : oldLastStyle;
Style newStyle = groupHeader.Level < _rowGroupHeaderStyles.Count ? _rowGroupHeaderStyles[groupHeader.Level] : lastStyle;
EnsureElementStyle(groupHeader, oldStyle, newStyle);
}
}
}
_rowGroupHeaderStylesOld.Clear();
foreach (Style style in _rowGroupHeaderStyles)
{
_rowGroupHeaderStylesOld.Add(style);
}
}
private void SelectAll()
{
SetRowsSelection(0, this.SlotCount - 1);
}
private void SetAndSelectCurrentCell(
int columnIndex,
int slot,
bool forceCurrentCellSelection)
{
DataGridSelectionAction action = forceCurrentCellSelection ? DataGridSelectionAction.SelectCurrent : DataGridSelectionAction.None;
UpdateSelectionAndCurrency(columnIndex, slot, action, false /*scrollIntoView*/);
}
// columnIndex = 2, rowIndex = -1 --> current cell belongs to the 'new row'.
// columnIndex = 2, rowIndex = 2 --> current cell is an inner cell
// columnIndex = -1, rowIndex = -1 --> current cell is reset
// columnIndex = -1, rowIndex = 2 --> Unexpected
private bool SetCurrentCellCore(int columnIndex, int slot, bool commitEdit, bool endRowEdit)
{
DiagnosticsDebug.Assert(columnIndex < this.ColumnsItemsInternal.Count, "Expected columnIndex smaller than ColumnsItemsInternal.Count.");
DiagnosticsDebug.Assert(slot < this.SlotCount, "Expected slot smaller than this.SlotCount.");
DiagnosticsDebug.Assert(columnIndex == -1 || this.ColumnsItemsInternal[columnIndex].IsVisible, "Expected columnIndex equals -1 or ColumnsItemsInternal[columnIndex].IsVisible is true.");
DiagnosticsDebug.Assert(columnIndex <= -1 || slot != -1, "Expected columnIndex smaller than or equal to -1 or slot other than -1.");
if (columnIndex == this.CurrentColumnIndex &&
slot == this.CurrentSlot)
{
DiagnosticsDebug.Assert(this.DataConnection != null, "Expected non-null DataConnection.");
DiagnosticsDebug.Assert(_editingColumnIndex == -1 || _editingColumnIndex == this.CurrentColumnIndex, "Expected _editingColumnIndex equals -1 or _editingColumnIndex equals CurrentColumnIndex.");
DiagnosticsDebug.Assert(this.EditingRow == null || this.EditingRow.Slot == this.CurrentSlot || this.DataConnection.EndingEdit, "Expected EditingRow is null or EditingRow.Slot equals CurrentSlot or DataConnection.EndingEdit is true.");
return true;
}
UIElement oldDisplayedElement = null;
DataGridCellCoordinates oldCurrentCell = new DataGridCellCoordinates(this.CurrentCellCoordinates);
object newCurrentItem = null;
if (!this.RowGroupHeadersTable.Contains(slot))
{
int rowIndex = this.RowIndexFromSlot(slot);
if (rowIndex >= 0 && rowIndex < this.DataConnection.Count)
{
newCurrentItem = this.DataConnection.GetDataItem(rowIndex);
}
}
if (this.CurrentColumnIndex > -1)
{
DiagnosticsDebug.Assert(this.CurrentColumnIndex < this.ColumnsItemsInternal.Count, "Expected CurrentColumnIndex smaller than ColumnsItemsInternal.Count.");
DiagnosticsDebug.Assert(this.CurrentSlot < this.SlotCount, "Expected CurrentSlot smaller than SlotCount.");
if (!IsInnerCellOutOfBounds(oldCurrentCell.ColumnIndex, oldCurrentCell.Slot) &&
this.IsSlotVisible(oldCurrentCell.Slot))
{
oldDisplayedElement = this.DisplayData.GetDisplayedElement(oldCurrentCell.Slot);
}
if (!this.RowGroupHeadersTable.Contains(oldCurrentCell.Slot) && !_temporarilyResetCurrentCell)
{
bool keepFocus = this.ContainsFocus;
if (commitEdit)
{
if (!EndCellEdit(DataGridEditAction.Commit, true /*exitEditingMode*/, keepFocus, true /*raiseEvents*/))
{
return false;
}
// Resetting the current cell: setting it to (-1, -1) is not considered setting it out of bounds
if ((columnIndex != -1 && slot != -1 && IsInnerCellOutOfSelectionBounds(columnIndex, slot)) ||
IsInnerCellOutOfSelectionBounds(oldCurrentCell.ColumnIndex, oldCurrentCell.Slot))
{
return false;
}
if (endRowEdit && !EndRowEdit(DataGridEditAction.Commit, true /*exitEditingMode*/, true /*raiseEvents*/))
{
return false;
}
}
else
{
this.CancelEdit(DataGridEditingUnit.Row, false);
ExitEdit(keepFocus);
}
}
}
if (newCurrentItem != null)
{
slot = this.SlotFromRowIndex(this.DataConnection.IndexOf(newCurrentItem));
}
if (slot == -1 && columnIndex != -1)
{
return false;
}
if (_noFocusedColumnChangeCount == 0)
{
this.ColumnHeaderHasFocus = false;
}
this.CurrentColumnIndex = columnIndex;
this.CurrentSlot = slot;
if (_temporarilyResetCurrentCell)
{
if (columnIndex != -1)
{
_temporarilyResetCurrentCell = false;
}
}
if (!_temporarilyResetCurrentCell && _editingColumnIndex != -1)
{
_editingColumnIndex = columnIndex;
}
if (oldDisplayedElement != null)
{
DataGridRow row = oldDisplayedElement as DataGridRow;
if (row != null)
{
// Don't reset the state of the current cell if we're editing it because that would put it in an invalid state
UpdateCurrentState(oldDisplayedElement, oldCurrentCell.ColumnIndex, !(_temporarilyResetCurrentCell && row.IsEditing && _editingColumnIndex == oldCurrentCell.ColumnIndex));
}
else
{
UpdateCurrentState(oldDisplayedElement, oldCurrentCell.ColumnIndex, false /*applyCellState*/);
}
}
if (this.CurrentColumnIndex > -1)
{
DiagnosticsDebug.Assert(this.CurrentSlot > -1, "Expected CurrentSlot greater than -1.");
DiagnosticsDebug.Assert(this.CurrentColumnIndex < this.ColumnsItemsInternal.Count, "Expected CurrentColumnIndex smaller than ColumnsItemsInternal.Count.");
DiagnosticsDebug.Assert(this.CurrentSlot < this.SlotCount, "Expected CurrentSlot smaller than SlotCount.");
if (this.IsSlotVisible(this.CurrentSlot))
{
UpdateCurrentState(this.DisplayData.GetDisplayedElement(this.CurrentSlot), this.CurrentColumnIndex, true /*applyCellState*/);
}
}
return true;
}
private void SetHorizontalOffset(double newHorizontalOffset)
{
if (_hScrollBar != null && _hScrollBar.Value != newHorizontalOffset)
{
_hScrollBar.Value = newHorizontalOffset;
// Unless the control is still loading, show the scroll bars when an offset changes. Keep the existing indicator type.
if (VisualTreeHelper.GetParent(this) != null)
{
ShowScrollBars();
}
}
}
private void SetVerticalOffset(double newVerticalOffset)
{
VerticalOffset = newVerticalOffset;
if (_vScrollBar != null && !DoubleUtil.AreClose(newVerticalOffset, _vScrollBar.Value))
{
_vScrollBar.Value = _verticalOffset;
// Unless the control is still loading, show the scroll bars when an offset changes. Keep the existing indicator type.
if (VisualTreeHelper.GetParent(this) != null)
{
ShowScrollBars();
}
}
}
#if FEATURE_VALIDATION_SUMMARY
/// <summary>
/// Determines whether or not a specific validation result should be displayed in the ValidationSummary.
/// </summary>
/// <param name="validationResult">Validation result to display.</param>
/// <returns>True if it should be added to the ValidationSummary, false otherwise.</returns>
private bool ShouldDisplayValidationResult(ValidationResult validationResult)
{
if (this.EditingRow != null)
{
return !_bindingValidationResults.ContainsEqualValidationResult(validationResult) ||
this.EditingRow.DataContext is IDataErrorInfo || this.EditingRow.DataContext is INotifyDataErrorInfo;
}
return false;
}
#endif
private void ShowScrollBars()
{
if (this.AreAllScrollBarsCollapsed)
{
_proposedScrollBarsState = ScrollBarVisualState.NoIndicator;
_proposedScrollBarsSeparatorState = ScrollBarsSeparatorVisualState.SeparatorCollapsedWithoutAnimation;
SwitchScrollBarsVisualStates(_proposedScrollBarsState, _proposedScrollBarsSeparatorState, false /*useTransitions*/);
}
else
{
if (_hideScrollBarsTimer != null && _hideScrollBarsTimer.IsRunning)
{
_hideScrollBarsTimer.Stop();
_hideScrollBarsTimer.Start();
}
// Mouse indicators dominate if they are already showing or if we have set the flag to prefer them.
if (_preferMouseIndicators || _showingMouseIndicators)
{
if (this.AreBothScrollBarsVisible && (_isPointerOverHorizontalScrollBar || _isPointerOverVerticalScrollBar))
{
_proposedScrollBarsState = ScrollBarVisualState.MouseIndicatorFull;
}
else
{
_proposedScrollBarsState = ScrollBarVisualState.MouseIndicator;
}
_showingMouseIndicators = true;
}
else
{
_proposedScrollBarsState = ScrollBarVisualState.TouchIndicator;
}
// Select the proper state for the scroll bars separator square within the GroupScrollBarsSeparator group:
if (UISettingsHelper.AreSettingsEnablingAnimations)
{
// When OS animations are turned on, show the square when a scroll bar is shown unless the DataGrid is disabled, using an animation.
_proposedScrollBarsSeparatorState =
this.IsEnabled &&
_proposedScrollBarsState == ScrollBarVisualState.MouseIndicatorFull ?
ScrollBarsSeparatorVisualState.SeparatorExpanded : ScrollBarsSeparatorVisualState.SeparatorCollapsed;
}
else
{
// OS animations are turned off. Show or hide the square depending on the presence of a scroll bars, without an animation.
// When the DataGrid is disabled, hide the square in sync with the scroll bar(s).
if (_proposedScrollBarsState == ScrollBarVisualState.MouseIndicatorFull)
{
_proposedScrollBarsSeparatorState = this.IsEnabled ? ScrollBarsSeparatorVisualState.SeparatorExpandedWithoutAnimation : ScrollBarsSeparatorVisualState.SeparatorCollapsed;
}
else
{
_proposedScrollBarsSeparatorState = this.IsEnabled ? ScrollBarsSeparatorVisualState.SeparatorCollapsedWithoutAnimation : ScrollBarsSeparatorVisualState.SeparatorCollapsed;
}
}
if (!UISettingsHelper.AreSettingsAutoHidingScrollBars)
{
if (this.AreBothScrollBarsVisible)
{
if (UISettingsHelper.AreSettingsEnablingAnimations)
{
SwitchScrollBarsVisualStates(ScrollBarVisualState.MouseIndicatorFull, this.IsEnabled ? ScrollBarsSeparatorVisualState.SeparatorExpanded : ScrollBarsSeparatorVisualState.SeparatorCollapsed, true /*useTransitions*/);
}
else
{
SwitchScrollBarsVisualStates(ScrollBarVisualState.MouseIndicatorFull, this.IsEnabled ? ScrollBarsSeparatorVisualState.SeparatorExpandedWithoutAnimation : ScrollBarsSeparatorVisualState.SeparatorCollapsed, true /*useTransitions*/);
}
}
else
{
if (UISettingsHelper.AreSettingsEnablingAnimations)
{
SwitchScrollBarsVisualStates(ScrollBarVisualState.MouseIndicator, ScrollBarsSeparatorVisualState.SeparatorCollapsed, true /*useTransitions*/);
}
else
{
SwitchScrollBarsVisualStates(ScrollBarVisualState.MouseIndicator, this.IsEnabled ? ScrollBarsSeparatorVisualState.SeparatorCollapsedWithoutAnimation : ScrollBarsSeparatorVisualState.SeparatorCollapsed, true /*useTransitions*/);
}
}
}
else
{
SwitchScrollBarsVisualStates(_proposedScrollBarsState, _proposedScrollBarsSeparatorState, true /*useTransitions*/);
}
}
}
private void StopHideScrollBarsTimer()
{
if (_hideScrollBarsTimer != null && _hideScrollBarsTimer.IsRunning)
{
_hideScrollBarsTimer.Stop();
}
}
private void SwitchScrollBarsVisualStates(ScrollBarVisualState scrollBarsState, ScrollBarsSeparatorVisualState separatorState, bool useTransitions)
{
switch (scrollBarsState)
{
case ScrollBarVisualState.NoIndicator:
VisualStates.GoToState(this, useTransitions, VisualStates.StateNoIndicator);
if (!_hasNoIndicatorStateStoryboardCompletedHandler)
{
_showingMouseIndicators = false;
}
break;
case ScrollBarVisualState.TouchIndicator:
VisualStates.GoToState(this, useTransitions, VisualStates.StateTouchIndicator);
break;
case ScrollBarVisualState.MouseIndicator:
VisualStates.GoToState(this, useTransitions, VisualStates.StateMouseIndicator);
break;
case ScrollBarVisualState.MouseIndicatorFull:
VisualStates.GoToState(this, useTransitions, VisualStates.StateMouseIndicatorFull);
break;
}
switch (separatorState)
{
case ScrollBarsSeparatorVisualState.SeparatorCollapsed:
VisualStates.GoToState(this, useTransitions, VisualStates.StateSeparatorCollapsed);
break;
case ScrollBarsSeparatorVisualState.SeparatorExpanded:
VisualStates.GoToState(this, useTransitions, VisualStates.StateSeparatorExpanded);
break;
case ScrollBarsSeparatorVisualState.SeparatorExpandedWithoutAnimation:
VisualStates.GoToState(this, useTransitions, VisualStates.StateSeparatorExpandedWithoutAnimation);
break;
case ScrollBarsSeparatorVisualState.SeparatorCollapsedWithoutAnimation:
VisualStates.GoToState(this, useTransitions, VisualStates.StateSeparatorCollapsedWithoutAnimation);
break;
}
}
private void UnhookHorizontalScrollBarEvents()
{
if (_hScrollBar != null)
{
_hScrollBar.Scroll -= new ScrollEventHandler(HorizontalScrollBar_Scroll);
_hScrollBar.PointerEntered -= new PointerEventHandler(HorizontalScrollBar_PointerEntered);
_hScrollBar.PointerExited -= new PointerEventHandler(HorizontalScrollBar_PointerExited);
}
}
private void UnhookVerticalScrollBarEvents()
{
if (_vScrollBar != null)
{
_vScrollBar.Scroll -= new ScrollEventHandler(VerticalScrollBar_Scroll);
_vScrollBar.PointerEntered -= new PointerEventHandler(VerticalScrollBar_PointerEntered);
_vScrollBar.PointerExited -= new PointerEventHandler(VerticalScrollBar_PointerExited);
}
}
private void UpdateCurrentState(UIElement displayedElement, int columnIndex, bool applyCellState)
{
DataGridRow row = displayedElement as DataGridRow;
if (row != null)
{
if (this.AreRowHeadersVisible)
{
row.ApplyHeaderState(true /*animate*/);
}
DataGridCell cell = row.Cells[columnIndex];
if (applyCellState)
{
cell.ApplyCellState(true /*animate*/);
}
}
else
{
DataGridRowGroupHeader groupHeader = displayedElement as DataGridRowGroupHeader;
if (groupHeader != null)
{
groupHeader.ApplyState(true /*useTransitions*/);
if (this.AreRowHeadersVisible)
{
groupHeader.ApplyHeaderState(true /*animate*/);
}
}
}
}
private void UpdateDisabledVisual()
{
if (this.IsEnabled)
{
VisualStates.GoToState(this, true, VisualStates.StateNormal);
}
else
{
VisualStates.GoToState(this, true, VisualStates.StateDisabled, VisualStates.StateNormal);
}
}
private void UpdateHorizontalScrollBar(bool needHorizScrollBar, bool forceHorizScrollBar, double totalVisibleWidth, double totalVisibleFrozenWidth, double cellsWidth)
{
if (_hScrollBar != null)
{
if (needHorizScrollBar || forceHorizScrollBar)
{
// ..........viewportSize
// v---v
// |<|_____|###|>|
// ^ ^
// min max
// we want to make the relative size of the thumb reflect the relative size of the viewing area
// viewportSize / (max + viewportSize) = cellsWidth / max
// -> viewportSize = max * cellsWidth / (max - cellsWidth)
// always zero
_hScrollBar.Minimum = 0;
if (needHorizScrollBar)
{
// maximum travel distance -- not the total width
_hScrollBar.Maximum = totalVisibleWidth - cellsWidth;
DiagnosticsDebug.Assert(totalVisibleFrozenWidth >= 0, "Expected positive totalVisibleFrozenWidth.");
if (_frozenColumnScrollBarSpacer != null)
{
_frozenColumnScrollBarSpacer.Width = totalVisibleFrozenWidth;
}
DiagnosticsDebug.Assert(_hScrollBar.Maximum >= 0, "Expected positive _hScrollBar.Maximum.");
// width of the scrollable viewing area
double viewPortSize = Math.Max(0, cellsWidth - totalVisibleFrozenWidth);
_hScrollBar.ViewportSize = viewPortSize;
_hScrollBar.LargeChange = viewPortSize;
// The ScrollBar should be in sync with HorizontalOffset at this point. There's a resize case
// where the ScrollBar will coerce an old value here, but we don't want that.
SetHorizontalOffset(_horizontalOffset);
_hScrollBar.IsEnabled = true;
}
else
{
_hScrollBar.Maximum = 0;
_hScrollBar.ViewportSize = 0;
_hScrollBar.IsEnabled = false;
}
if (_hScrollBar.Visibility != Visibility.Visible)
{
// This will trigger a call to this method via Cells_SizeChanged for which no processing is needed.
_hScrollBar.Visibility = Visibility.Visible;
_ignoreNextScrollBarsLayout = true;
if (!this.IsHorizontalScrollBarOverCells && _hScrollBar.DesiredSize.Height == 0)
{
// We need to know the height for the rest of layout to work correctly so measure it now
_hScrollBar.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
}
}
}
else
{
_hScrollBar.Maximum = 0;
if (_hScrollBar.Visibility != Visibility.Collapsed)
{
// This will trigger a call to this method via Cells_SizeChanged for which no processing is needed.
_hScrollBar.Visibility = Visibility.Collapsed;
_ignoreNextScrollBarsLayout = true;
}
}
DataGridAutomationPeer peer = DataGridAutomationPeer.FromElement(this) as DataGridAutomationPeer;
if (peer != null)
{
peer.RaiseAutomationScrollEvents();
}
}
}
#if FEATURE_IEDITABLECOLLECTIONVIEW
private void UpdateNewItemPlaceholder()
{
int placeholderSlot = SlotFromRowIndex(this.DataConnection.NewItemPlaceholderIndex);
if (this.DataConnection.NewItemPlaceholderPosition == NewItemPlaceholderPosition.AtEnd &&
_collapsedSlotsTable.Contains(placeholderSlot) != this.IsReadOnly)
{
if (this.IsReadOnly)
{
if (this.SelectedIndex == this.DataConnection.NewItemPlaceholderIndex)
{
this.SelectedIndex = Math.Max(-1, this.DataConnection.Count - 2);
}
if (this.IsSlotVisible(SlotFromRowIndex(this.DataConnection.NewItemPlaceholderIndex)))
{
this.RemoveDisplayedElement(placeholderSlot, false, true);
this.InvalidateRowsArrange();
}
_collapsedSlotsTable.AddValue(placeholderSlot, Visibility.Collapsed);
}
else
{
_collapsedSlotsTable.RemoveValue(placeholderSlot);
}
this.VisibleSlotCount = this.SlotCount - _collapsedSlotsTable.GetIndexCount(0, this.SlotCount - 1);
this.ComputeScrollBarsLayout();
}
}
#endif
private void UpdateRowDetailsVisibilityMode(DataGridRowDetailsVisibilityMode newDetailsMode)
{
if (_rowsPresenter != null && this.DataConnection.Count > 0)
{
Visibility newDetailsVisibility = Visibility.Collapsed;
switch (newDetailsMode)
{
case DataGridRowDetailsVisibilityMode.Visible:
newDetailsVisibility = Visibility.Visible;
break;
case DataGridRowDetailsVisibilityMode.Collapsed:
newDetailsVisibility = Visibility.Collapsed;
break;
case DataGridRowDetailsVisibilityMode.VisibleWhenSelected:
break;
}
this.ClearShowDetailsTable();
bool updated = false;
foreach (DataGridRow row in this.GetAllRows())
{
if (row.Visibility == Visibility.Visible)
{
if (newDetailsMode == DataGridRowDetailsVisibilityMode.VisibleWhenSelected)
{
// For VisibleWhenSelected, we need to calculate the value for each individual row
newDetailsVisibility = _selectedItems.ContainsSlot(row.Slot) && row.Index != this.DataConnection.NewItemPlaceholderIndex ? Visibility.Visible : Visibility.Collapsed;
}
if (row.DetailsVisibility != newDetailsVisibility)
{
updated = true;
row.SetDetailsVisibilityInternal(
newDetailsVisibility,
true /*raiseNotification*/);
}
}
}
if (updated)
{
UpdateDisplayedRows(this.DisplayData.FirstScrollingSlot, this.CellsHeight);
InvalidateRowsMeasure(false /*invalidateIndividualElements*/);
}
}
}
private void UpdateRowsPresenterManipulationMode(bool horizontalMode, bool verticalMode)
{
if (_rowsPresenter != null)
{
ManipulationModes manipulationMode = _rowsPresenter.ManipulationMode;
if (horizontalMode)
{
if (this.HorizontalScrollBarVisibility != ScrollBarVisibility.Disabled)
{
manipulationMode |= ManipulationModes.TranslateX | ManipulationModes.TranslateInertia;
}
else
{
manipulationMode &= ~(ManipulationModes.TranslateX | ManipulationModes.TranslateRailsX);
}
}
if (verticalMode)
{
if (this.VerticalScrollBarVisibility != ScrollBarVisibility.Disabled)
{
manipulationMode |= ManipulationModes.TranslateY | ManipulationModes.TranslateInertia;
}
else
{
manipulationMode &= ~(ManipulationModes.TranslateY | ManipulationModes.TranslateRailsY);
}
}
if ((manipulationMode & (ManipulationModes.TranslateX | ManipulationModes.TranslateY)) == (ManipulationModes.TranslateX | ManipulationModes.TranslateY))
{
manipulationMode |= ManipulationModes.TranslateRailsX | ManipulationModes.TranslateRailsY;
}
if ((manipulationMode & (ManipulationModes.TranslateX | ManipulationModes.TranslateRailsX | ManipulationModes.TranslateY | ManipulationModes.TranslateRailsY)) ==
ManipulationModes.None)
{
manipulationMode &= ~ManipulationModes.TranslateInertia;
}
_rowsPresenter.ManipulationMode = manipulationMode;
}
}
private bool UpdateStateOnTapped(TappedRoutedEventArgs args, int columnIndex, int slot, bool allowEdit, bool shift, bool ctrl)
{
bool beginEdit;
DiagnosticsDebug.Assert(slot >= 0, "Expected positive slot.");
// Before changing selection, check if the current cell needs to be committed, and
// check if the current row needs to be committed. If any of those two operations are required and fail,
// do not change selection, and do not change current cell.
bool wasInEdit = this.EditingColumnIndex != -1;
if (IsSlotOutOfBounds(slot))
{
return true;
}
if (wasInEdit && (columnIndex != this.EditingColumnIndex || slot != this.CurrentSlot) &&
this.WaitForLostFocus(() => { this.UpdateStateOnTapped(args, columnIndex, slot, allowEdit, shift, ctrl); }))
{
return true;
}
try
{
_noSelectionChangeCount++;
beginEdit = allowEdit &&
this.CurrentSlot == slot &&
columnIndex != -1 &&
(wasInEdit || this.CurrentColumnIndex == columnIndex) &&
!GetColumnEffectiveReadOnlyState(this.ColumnsItemsInternal[columnIndex]);
DataGridSelectionAction action;
if (this.SelectionMode == DataGridSelectionMode.Extended && shift)
{
// Shift select multiple rows.
action = DataGridSelectionAction.SelectFromAnchorToCurrent;
}
else if (GetRowSelection(slot))
{
// Unselecting single row or Selecting a previously multi-selected row.
if (!ctrl && this.SelectionMode == DataGridSelectionMode.Extended && _selectedItems.Count != 0)
{
// Unselect everything except the row that was clicked on.
action = DataGridSelectionAction.SelectCurrent;
}
else if (ctrl && this.EditingRow == null)
{
action = DataGridSelectionAction.RemoveCurrentFromSelection;
}
else
{
action = DataGridSelectionAction.None;
}
}
else
{
// Selecting a single row or multi-selecting with Ctrl.
if (this.SelectionMode == DataGridSelectionMode.Single || !ctrl)
{
// Unselect the correctly selected rows except the new selected row.
action = DataGridSelectionAction.SelectCurrent;
}
else
{
action = DataGridSelectionAction.AddCurrentToSelection;
}
}
UpdateSelectionAndCurrency(columnIndex, slot, action, false /*scrollIntoView*/);
}
finally
{
this.NoSelectionChangeCount--;
}
if (_successfullyUpdatedSelection && beginEdit && BeginCellEdit(args))
{
FocusEditingCell(true /*setFocus*/);
}
return true;
}
/// <summary>
/// Updates the DataGrid's validation results, modifies the ValidationSummary's items,
/// and sets the IsValid states of the UIElements.
/// </summary>
/// <param name="newValidationResults">New validation results.</param>
/// <param name="scrollIntoView">If the validation results have changed, scrolls the editing row into view.</param>
private void UpdateValidationResults(List<ValidationResult> newValidationResults, bool scrollIntoView)
{
bool validationResultsChanged = false;
DiagnosticsDebug.Assert(this.EditingRow != null, "Expected non-null EditingRow.");
// Remove the validation results that have been fixed
List<ValidationResult> removedValidationResults = new List<ValidationResult>();
foreach (ValidationResult oldValidationResult in _validationResults)
{
if (oldValidationResult != null && !newValidationResults.ContainsEqualValidationResult(oldValidationResult))
{
removedValidationResults.Add(oldValidationResult);
validationResultsChanged = true;
}
}
foreach (ValidationResult removedValidationResult in removedValidationResults)
{
_validationResults.Remove(removedValidationResult);
#if FEATURE_VALIDATION_SUMMARY
if (_validationSummary != null)
{
ValidationSummaryItem removedValidationSummaryItem = this.FindValidationSummaryItem(removedValidationResult);
if (removedValidationSummaryItem != null)
{
_validationSummary.Errors.Remove(removedValidationSummaryItem);
}
}
#endif
}
// Add any validation results that were just introduced
foreach (ValidationResult newValidationResult in newValidationResults)
{
if (newValidationResult != null && !_validationResults.ContainsEqualValidationResult(newValidationResult))
{
_validationResults.Add(newValidationResult);
#if FEATURE_VALIDATION_SUMMARY
if (_validationSummary != null && ShouldDisplayValidationResult(newValidationResult))
{
ValidationSummaryItem newValidationSummaryItem = this.CreateValidationSummaryItem(newValidationResult);
if (newValidationSummaryItem != null)
{
_validationSummary.Errors.Add(newValidationSummaryItem);
}
}
#endif
validationResultsChanged = true;
}
}
if (validationResultsChanged)
{
this.UpdateValidationStatus();
}
if (!this.IsValid && scrollIntoView)
{
// Scroll the row with the error into view.
int editingRowSlot = this.EditingRow.Slot;
#if FEATURE_VALIDATION_SUMMARY
if (_validationSummary != null)
{
// If the number of errors has changed, then the ValidationSummary will be a different size,
// and we need to delay our call to ScrollSlotIntoView
this.InvalidateMeasure();
// TODO: Move to DispatcherQueue when FEATURE_VALIDATION_SUMMARY is enabled
this.Dispatcher.BeginInvoke(() =>
{
// It's possible that the DataContext or ItemsSource has changed by the time we reach this code,
// so we need to ensure that the editing row still exists before scrolling it into view
if (!this.IsSlotOutOfBounds(editingRowSlot) && editingRowSlot != -1)
{
this.ScrollSlotIntoView(editingRowSlot, false /*scrolledHorizontally*/);
}
});
}
else
#endif
{
this.ScrollSlotIntoView(editingRowSlot, false /*scrolledHorizontally*/);
}
}
}
/// <summary>
/// Updates the IsValid states of the DataGrid, the EditingRow and its cells. All cells related to
/// property-level errors are set to Invalid. If there is an object-level error selected in the
/// ValidationSummary, then its associated cells will also be flagged (if there are any).
/// </summary>
private void UpdateValidationStatus()
{
if (this.EditingRow != null)
{
foreach (DataGridCell cell in this.EditingRow.Cells)
{
bool isCellValid = true;
DiagnosticsDebug.Assert(cell.OwningColumn != null, "Expected cell has owning column.");
if (!cell.OwningColumn.IsReadOnly)
{
foreach (ValidationResult validationResult in _validationResults)
{
bool validationResultIsSelectedValidationSummaryItemContext = false;
#if FEATURE_VALIDATION_SUMMARY
validationResultIsSelectedValidationSummaryItemContext = _selectedValidationSummaryItem != null && _selectedValidationSummaryItem.Context == validationResult;
#endif
if (_propertyValidationResults.ContainsEqualValidationResult(validationResult) ||
validationResultIsSelectedValidationSummaryItemContext)
{
foreach (string bindingPath in validationResult.MemberNames)
{
if (cell.OwningColumn.BindingPaths.Contains(bindingPath))
{
isCellValid = false;
break;
}
}
}
}
}
if (cell.IsValid != isCellValid)
{
cell.IsValid = isCellValid;
cell.ApplyCellState(true /*animate*/);
}
}
bool isRowValid = _validationResults.Count == 0;
if (this.EditingRow.IsValid != isRowValid)
{
this.EditingRow.IsValid = isRowValid;
this.EditingRow.ApplyState(true /*animate*/);
}
this.IsValid = isRowValid;
}
else
{
this.IsValid = true;
}
}
private void UpdateVerticalScrollBar(bool needVertScrollBar, bool forceVertScrollBar, double totalVisibleHeight, double cellsHeight)
{
if (_vScrollBar != null)
{
if (needVertScrollBar || forceVertScrollBar)
{
// ..........viewportSize
// v---v
// |<|_____|###|>|
// ^ ^
// min max
// we want to make the relative size of the thumb reflect the relative size of the viewing area
// viewportSize / (max + viewportSize) = cellsWidth / max
// -> viewportSize = max * cellsHeight / (totalVisibleHeight - cellsHeight)
// -> = max * cellsHeight / (totalVisibleHeight - cellsHeight)
// -> = max * cellsHeight / max
// -> = cellsHeight
// always zero
_vScrollBar.Minimum = 0;
if (needVertScrollBar && !double.IsInfinity(cellsHeight))
{
// maximum travel distance -- not the total height
_vScrollBar.Maximum = totalVisibleHeight - cellsHeight;
DiagnosticsDebug.Assert(_vScrollBar.Maximum >= 0, "Expected positive _vScrollBar.Maximum.");
// total height of the display area
_vScrollBar.ViewportSize = cellsHeight;
_vScrollBar.LargeChange = cellsHeight;
_vScrollBar.IsEnabled = true;
}
else
{
_vScrollBar.Maximum = 0;
_vScrollBar.ViewportSize = 0;
_vScrollBar.IsEnabled = false;
}
if (_vScrollBar.Visibility != Visibility.Visible)
{
// This will trigger a call to this method via Cells_SizeChanged for which no processing is needed.
_vScrollBar.Visibility = Visibility.Visible;
_ignoreNextScrollBarsLayout = true;
if (!this.IsVerticalScrollBarOverCells && _vScrollBar.DesiredSize.Width == 0)
{
// We need to know the width for the rest of layout to work correctly so measure it now.
_vScrollBar.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
}
}
}
else
{
_vScrollBar.Maximum = 0;
if (_vScrollBar.Visibility != Visibility.Collapsed)
{
// This will trigger a call to this method via Cells_SizeChanged for which no processing is needed.
_vScrollBar.Visibility = Visibility.Collapsed;
_ignoreNextScrollBarsLayout = true;
}
}
DataGridAutomationPeer peer = DataGridAutomationPeer.FromElement(this) as DataGridAutomationPeer;
if (peer != null)
{
peer.RaiseAutomationScrollEvents();
}
}
}
/// <summary>
/// Validates the current editing row and updates the visual states.
/// </summary>
/// <param name="scrollIntoView">If true, will scroll the editing row into view when a new error is introduced.</param>
/// <param name="wireEvents">If true, subscribes to the asynchronous INDEI ErrorsChanged events.</param>
/// <returns>True if the editing row is valid, false otherwise.</returns>
private bool ValidateEditingRow(bool scrollIntoView, bool wireEvents)
{
List<ValidationResult> validationResults;
if (_initializingNewItem)
{
// We only want to run property validation if we're initializing a new item. Instead of
// clearing all the errors, we will only remove those associated with the current column.
validationResults = new List<ValidationResult>(_validationResults);
}
else
{
// We're going to run full entity-level validation, so throw away the
// old errors since they will be recreated if they're still active.
_propertyValidationResults.Clear();
_indeiValidationResults.Clear();
validationResults = new List<ValidationResult>();
}
if (this.EditingRow != null)
{
object dataItem = this.EditingRow.DataContext;
DiagnosticsDebug.Assert(dataItem != null, "Expected non-null dataItem.");
if (!_initializingNewItem)
{
// Validate using the Validator.
ValidationContext context = new ValidationContext(dataItem, null, null);
Validator.TryValidateObject(dataItem, context, validationResults, true);
#if FEATURE_IDATAERRORINFO
// IDEI entity validation.
this.ValidateIdei(dataItem as IDataErrorInfo, null, null, validationResults);
#endif
// INDEI entity validation.
this.ValidateIndei(dataItem as INotifyDataErrorInfo, null, null, null, validationResults, wireEvents);
}
// IDEI and INDEI property validation.
foreach (DataGridColumn column in this.ColumnsInternal.GetDisplayedColumns(c => c.IsVisible && !c.IsReadOnly))
{
if (!_initializingNewItem || column == this.CurrentColumn)
{
foreach (string bindingPath in column.BindingPaths)
{
string declaringPath = null;
object declaringItem = dataItem;
string bindingProperty = bindingPath;
// Check for nested paths.
int lastIndexOfSeparator = bindingPath.LastIndexOfAny(new char[] { TypeHelper.PropertyNameSeparator, TypeHelper.LeftIndexerToken });
if (lastIndexOfSeparator >= 0)
{
declaringPath = bindingPath.Substring(0, lastIndexOfSeparator);
declaringItem = TypeHelper.GetNestedPropertyValue(dataItem, declaringPath);
if (bindingProperty[lastIndexOfSeparator] == TypeHelper.LeftIndexerToken)
{
bindingProperty = TypeHelper.PrependDefaultMemberName(declaringItem, bindingPath.Substring(lastIndexOfSeparator));
}
else
{
bindingProperty = bindingPath.Substring(lastIndexOfSeparator + 1);
}
}
if (_initializingNewItem)
{
// We're only re-validating the current column, so remove its old errors
// because we're about to check if they're still relevant.
foreach (ValidationResult oldValidationResult in _validationResults)
{
if (oldValidationResult != null && oldValidationResult.ContainsMemberName(bindingPath))
{
validationResults.Remove(oldValidationResult);
_indeiValidationResults.Remove(oldValidationResult);
_propertyValidationResults.Remove(oldValidationResult);
}
}
}
#if FEATURE_IDATAERRORINFO
// IDEI property validation.
this.ValidateIdei(declaringItem as IDataErrorInfo, bindingProperty, bindingPath, validationResults);
#endif
// INDEI property validation.
this.ValidateIndei(declaringItem as INotifyDataErrorInfo, bindingProperty, bindingPath, declaringPath, validationResults, wireEvents);
}
}
}
// Add any existing exception errors (in case we're editing a cell).
// Note: these errors will only be displayed in the ValidationSummary if the
// editing data item implements IDEI or INDEI.
foreach (ValidationResult validationResult in _bindingValidationResults)
{
validationResults.AddIfNew(validationResult);
_propertyValidationResults.AddIfNew(validationResult);
}
// Merge the new validation results with the existing ones.
this.UpdateValidationResults(validationResults, scrollIntoView);
// Return false if there are validation errors.
if (!this.IsValid)
{
return false;
}
}
// Return true if there are no errors or there is no editing row.
this.ResetValidationStatus();
return true;
}
#if FEATURE_IDATAERRORINFO
/// <summary>
/// Checks an IDEI data object for errors for the specified property. New errors are added to the
/// list of validation results.
/// </summary>
/// <param name="idei">IDEI object to validate.</param>
/// <param name="bindingProperty">Name of the property to validate.</param>
/// <param name="bindingPath">Path of the binding.</param>
/// <param name="validationResults">List of results to add to.</param>
private void ValidateIdei(IDataErrorInfo idei, string bindingProperty, string bindingPath, List<ValidationResult> validationResults)
{
if (idei != null)
{
string errorString = null;
if (string.IsNullOrEmpty(bindingProperty))
{
DiagnosticsDebug.Assert(string.IsNullOrEmpty(bindingPath));
ValidationUtil.CatchNonCriticalExceptions(() => { errorString = idei.Error; });
if (!string.IsNullOrEmpty(errorString))
{
validationResults.AddIfNew(new ValidationResult(errorString));
}
}
else
{
ValidationUtil.CatchNonCriticalExceptions(() => { errorString = idei[bindingProperty]; });
if (!string.IsNullOrEmpty(errorString))
{
ValidationResult validationResult = new ValidationResult(errorString, new List<string>() { bindingPath });
validationResults.AddIfNew(validationResult);
_propertyValidationResults.Add(validationResult);
}
}
}
}
#endif
/// <summary>
/// Checks an INDEI data object for errors on the specified path. New errors are added to the
/// list of validation results.
/// </summary>
/// <param name="indei">INDEI object to validate.</param>
/// <param name="bindingProperty">Name of the property to validate.</param>
/// <param name="bindingPath">Path of the binding.</param>
/// <param name="declaringPath">Path of the INDEI object.</param>
/// <param name="validationResults">List of results to add to.</param>
/// <param name="wireEvents">True if the ErrorsChanged event should be subscribed to.</param>
private void ValidateIndei(INotifyDataErrorInfo indei, string bindingProperty, string bindingPath, string declaringPath, List<ValidationResult> validationResults, bool wireEvents)
{
if (indei != null)
{
if (indei.HasErrors)
{
IEnumerable errors = null;
ValidationUtil.CatchNonCriticalExceptions(() => { errors = indei.GetErrors(bindingProperty); });
if (errors != null)
{
foreach (object errorItem in errors)
{
if (errorItem != null)
{
string errorString = null;
ValidationUtil.CatchNonCriticalExceptions(() => { errorString = errorItem.ToString(); });
if (!string.IsNullOrEmpty(errorString))
{
ValidationResult validationResult;
if (!string.IsNullOrEmpty(bindingProperty))
{
validationResult = new ValidationResult(errorString, new List<string>() { bindingPath });
_propertyValidationResults.Add(validationResult);
}
else
{
DiagnosticsDebug.Assert(string.IsNullOrEmpty(bindingPath), "Expected bindingPath is null or empty.");
validationResult = new ValidationResult(errorString);
}
validationResults.AddIfNew(validationResult);
_indeiValidationResults.AddIfNew(validationResult);
}
}
}
}
}
if (wireEvents && !_validationItems.ContainsKey(indei))
{
_validationItems.Add(indei, declaringPath);
indei.ErrorsChanged += new EventHandler<DataErrorsChangedEventArgs>(ValidationItem_ErrorsChanged);
}
}
}
/// <summary>
/// Handles the asynchronous INDEI errors that occur while the DataGrid is in editing mode.
/// </summary>
/// <param name="sender">INDEI item whose errors changed.</param>
/// <param name="e">Error event arguments.</param>
private void ValidationItem_ErrorsChanged(object sender, DataErrorsChangedEventArgs e)
{
INotifyDataErrorInfo indei = sender as INotifyDataErrorInfo;
if (_validationItems.ContainsKey(indei))
{
DiagnosticsDebug.Assert(this.EditingRow != null, "Expected non-null EditingRow.");
// Determine the binding path.
string bindingPath = _validationItems[indei];
if (string.IsNullOrEmpty(bindingPath))
{
bindingPath = e.PropertyName;
}
else if (!string.IsNullOrEmpty(e.PropertyName) && e.PropertyName.IndexOf(TypeHelper.LeftIndexerToken) >= 0)
{
bindingPath += TypeHelper.RemoveDefaultMemberName(e.PropertyName);
}
else
{
bindingPath += TypeHelper.PropertyNameSeparator + e.PropertyName;
}
// Remove the old errors.
List<ValidationResult> validationResults = new List<ValidationResult>();
foreach (ValidationResult validationResult in _validationResults)
{
ValidationResult oldValidationResult = _indeiValidationResults.FindEqualValidationResult(validationResult);
if (oldValidationResult != null && oldValidationResult.ContainsMemberName(bindingPath))
{
_indeiValidationResults.Remove(oldValidationResult);
}
else
{
validationResults.Add(validationResult);
}
}
// Find any new errors and update the visuals.
this.ValidateIndei(indei, e.PropertyName, bindingPath, null, validationResults, false /*wireEvents*/);
this.UpdateValidationResults(validationResults, false /*scrollIntoView*/);
// If we're valid now then reset our status.
if (this.IsValid)
{
this.ResetValidationStatus();
}
}
else if (indei != null)
{
indei.ErrorsChanged -= new EventHandler<DataErrorsChangedEventArgs>(ValidationItem_ErrorsChanged);
}
}
private void VerticalScrollBar_Scroll(object sender, ScrollEventArgs e)
{
ProcessVerticalScroll(e.ScrollEventType);
}
}
}
``` |
Synima is a genus of tropical rainforest trees, constituting part of the plant family Sapindaceae.
Three species are known to science , found growing naturally in north eastern Queensland, Australia, and in New Guinea.
Species
This listing was sourced from the Australian Plant Name Index and Australian Plant Census, the Australian Tropical Rainforest Plants (2010) information system, original taxonomic research publications, Flora Malesiana and the Flora of Australia.
Synima cordierorum – NE. Qld and New Guinea
Synima macrophylla – NE. Qld and New Guinea
Synima reynoldsiae – NE. Qld endemic
References
Cited works
Flora of New Guinea
Flora of Papua New Guinea
Flora of Queensland
Sapindales of Australia
Sapindaceae
Sapindaceae genera |
is a Japanese voice actress who works for Aoni Production.
Notable voice roles
Anime
Kaka in Dragon Quest
Kumomaru and Kirimaru in Anpanman
Kiki in Beyblade
Ichiro in Crayon Shin-chan
Roboka and Chinchao in Doraemon
Kaka in Dragon Quest
Trigger in Kurogane Communication
Toguru in Mushrambo (Shinzo)
Shibuki in Nintama Rantarou
Maruru and Misa in Nurse Angel Ririka SOS
Nana Baruburan in Remi the Homeless Girl
Carlo in Romeo no Aoi Sora
An Ohara (31) and other additional voices in Sailor Moon
Yu Yamanami in Soul Link
Games
Kurreshes in Black Matrix
Da Qiao and Xiao Qiao in the Dynasty Warriors series
Sawtooth in the Wacky Races series (3DO Games)
Dubbing
Patty in Practical Magic
External links
1967 births
Living people
Voice actresses from Kanagawa Prefecture
Japanese voice actresses
Aoni Production voice actors
20th-century Japanese male actors
21st-century Japanese male actors |
Joy Harden Bradford (born 1979) is an African American clinical psychologist based in Atlanta, Georgia. She is best known as the founder of a mental health platform called Therapy for Black Girls, which includes a podcast of the same name, that specializes in mental health issues relevant to Black women. As of 2019, the podcast's episodes have been downloaded over two million times.
Early life and education
Harden Bradford was raised in Paincourtville, Louisiana. She received her bachelor's degree from Xavier University of Louisiana and her master's degree in vocational rehabilitation counseling from Arkansas State University. She completed her doctoral degree in counseling psychology from the University of Georgia. She is a member of the Alpha Kappa Alpha sorority.
Career
Harden Bradford is a licensed psychologist who specializes in culturally competent practice for African American women. She has been a mental health practitioner since 2011 and worked as a college counselor until 2014, when she created Therapy for Black Girls. She came up with the idea for the name after watching Black Girls Rock! on BET. She stated in an interview with The Huffington Post that she wanted to start the platform because, "I wanted to talk about things like how your mental health is impacted by your lack of sleep, or how all the hours you spend on Instagram can actually make you feel bad about yourself...I don’t think we always do a great job focusing on mental wellness, and realizing that we all have mental health we have to take care of."
The platform includes a Facebook group called the Thrive Tribe, a directory of mental health therapists, a blog, and a podcast, also called Therapy for Black Girls. The podcast covers a variety of topics targeted at Black women, such as navigating life after divorce, or pop-culture topics like how to develop your own "hot girl summer."
Harden Bradford's work highlights the stigma of mental health in the African American community and the need for Black women to set boundaries. She has stated that she also seeks to normalize therapy in Black communities. In 2019 Harden Bradford developed an online therapist directory due to high demand for recommendations of Black women therapists.
She was recruited to co-host MTV's Teen Mom: Young + Pregnant reunion in December 2018.
Personal life
Harden Bradford is married.
Accolades
2021 – Winner, Webby Awards, Health & Wellness Podcast
2021 – Winner, Ambies Awards, Best Wellness or Relationships Podcast
2023 – Winner, NAACP Image Awards, Outstanding Lifestyle/Self-Help Podcast
See also
Race and health in the United States
Mental distress
References
External links
1979 births
Living people
African-American psychologists
American women psychologists
American women podcasters
American podcasters
People from Louisiana
Xavier University of Louisiana alumni
Arkansas State University alumni
University of Georgia alumni
American clinical psychologists
Mental health professionals
21st-century African-American women
21st-century African-American people
20th-century African-American people
20th-century African-American women |
Brunellia acostae is a species of plant in the Brunelliaceae family. It is native to Ecuador, Panama, and Colombia.
References
Flora of Southern America
acostae
Vulnerable plants
Plants described in 1954
Taxonomy articles created by Polbot |
Rajugan (, also Romanized as Rajūgān) is a village in Amjaz Rural District, in the Central District of Anbarabad County, Kerman Province, Iran. At the 2006 census, its population was 105, in 20 families.
References
Populated places in Anbarabad County |
Allen Klein (born April 26, 1938) is a pioneer in gelotology and the therapeutic humor movement. In 1974, Klein's wife was only 34 years old when she died of liver disease, and the aspect where she had kept her sense of humor all the way to the end inspired Klein to give up his previous career as a theater and television scene designer and to study human development. Klein is an American author and lecturer on the stress relieving benefits of humor and on gallows humor. Among other positions, Klein was the 2005-2006 president of The Association for Applied and Therapeutic Humor.
Publications
Klein has written 8 books on the therapeutic benefits of humor, happiness and positivity.
The Healing Power of Humor: Techniques for Getting through Loss, Setbacks, Upsets, Disappointments, Difficulties, Trials, Tribulations, and All That Not-So-Funny Stuff
The Courage to Laugh: Humor, Hope, and Healing in the Face of Death and Dying
Learning to Laugh When You Feel Like Crying: Embracing Life After Loss
L.A.U.G.H.: Using Humor and Play to Help Clients Cope with Stress, Anger, Frustration, and more
You Can't Ruin My Day: 52 Wake-Up Calls to Turn Any Situation Around
Secrets Kids Know...That Adults Oughta Learn
Embracing Life After Loss
The Awe Factor
In addition, he has edited several books of inspirational quotations. They are:
Change Your Life!: A Little Book of Big Ideas (foreword by Jack Canfield)
Inspiration for a Lifetime
The Art of Living Joyfully (endorsed by SARK)
Always Look on the Bright Side
Having the Time of Your Life
Mom's the Word
Word of Love
Positive Thoughts for Troubling Times
The Joy of Simplicity
Quotes
Source:
"Humor can help you cope with the unbearable so that you can stay on the bright side of things until the bright side actually comes along."
"Humor does not diminish the pain - it makes the space around it get bigger."
"When we are dealing with death we are constantly being dragged down by the event: Humor diverts our attention and lifts our sagging spirits."
"Your attitude is like a box of crayons that color your world. Constantly color your picture gray, and your picture will always be bleak. *Try adding some bright colors to the picture by including humor, and your picture begins to lighten up."
"The hardest thing you can do is smile when you are ill, in pain, or depressed. But this no-cost remedy is a necessary first half-step if you are to start on the road to recovery."
Awards
2007 Hunter College, The City University of New York, Hall of Fame honoree
Certified Speaking Professional designation from the National Speakers Association
Toastmasters International Communication and Leadership Award
2009 Doug Fletcher Lifetime Achievement Award from the Association for Applied and Therapeutic Humor
References
External links
Allen Klein's website
Jeffrey Mishlove interview with Allen Klein
"Laugh Your Way to Health" New Dimensions Radio interview
"Healing with Humor: Those Who Laugh, Last" Mother Earth News
"Sebastopol Author Allen Klein Shares His Secrets to Happiness"
1938 births
Living people
Humor researchers
American male writers
Writers from New York City |
Champ de Mars is a public park in Old Montreal quarter of Montreal, Quebec, Canada.
Formerly a military parade ground, the park had previously been traversed by Montreal's fortifications, which were demolished at the beginning of the 19th century. The adjacent Montreal City Hall (1878) and the old courthouse (1856) were later built inside the line of the fortifications. Champ de Mars served as a municipal parking lot starting in the 1960s until being restored as a park in 1992. At that time, the foundations of Montreal's city walls were discovered and restored.
The site's name commemorates its former military purpose; Mars was the Roman god of war and campus Martius was a Latin term for a military exercise ground. The walls now standing on site are the foundations of the original walls used to protect the city.
The area is bordered by the Montreal City Hall, the old and new courthouses and the Champ-de-Mars Metro station.
See also
List of Montreal parks#Urban squares.
References
External links
Champ de Mars, Vieux Montreal
Champ de Mars, Canada Photos
Parks in Montreal
Old Montreal
Demolished buildings and structures in Montreal
Military forts in Quebec |
The phantom cave snail or phantom cavesnail (Pyrgulopsis texana) is a species of very small freshwater snail with an operculum, an aquatic gastropod in the family Hydrobiidae.
Distribution
This species is endemic to the lower Pecos River basin, Texas, the United States.
Genus transfer
When originally described in 1935, the phantom cave snail was assigned to the genus Cochliopa. Following a detailed examination of shell and anatomical characteristics along with genetic sequencing it was transferred to the genus Pyrgulopsis in 2010.
References
Further reading
Dundee D. S. & Dundee H. A. (1969). "Notes Concerning Two Texas Molluscs, Cochliopa texana Pilsbry and Lyrodes cheatumi Pilsbry (Mollusca: Hydrobiidae)". Transactions of the American Microscopical Society 88(2): 205-210. JSTOR
Cole G. A. (1976). "A New Amphipod Crustacean, Gammarus hyalelloides n. sp., from Texas". Transactions of the American Microscopical Society 95(1): 80-85. JSTOR.
External links
http://ecos.fws.gov/speciesProfile/profile/speciesProfile.action?spcode=G00X
http://www.panda.org/about_our_earth/ecoregions/chihuahuan_freshwater.cfm
Molluscs of the United States
Pyrgulopsis
Cave snails
Gastropods described in 1935
Taxonomy articles created by Polbot
Endemic fauna of Texas |
Lyulka was a USSR aero engine design bureau and manufacturer from 1938 to the 1990s, when manufacturing and design elements were integrated as NPO Saturn based at Rybinsk. The Lyulka design bureau had its roots in the "Kharkiv Aviation Institute" ( Ukrainian SSR ) where Arkhip Mikhailovich Lyulka was working with a team designing the ATsN (Agregat Tsentralnovo Nadduva - Centralised supercharger) installation on the Petlyakov Pe-8 bomber. Lyul'ka was responsible for designing the first Soviet gas turbine engines. Preferring to steer away from copying captured German equipment, it succeeded in producing home grown engines.
Engines
References
Gunston, Bill. “The Osprey Encyclopaedia of Russian Aircraft 1875–1995”. London, Osprey. 1995.
External links
http://www.ctrl-c.liu.se/misc/ram/
Aircraft engine manufacturers of the Soviet Union |
Curlett is a surname. Notable people with the surname include:
William and Alexander Curlett, American architects, father and son
T. Spicer Curlett (1847–1914), American politician |
Kong Dan (Simplified Chinese: 孔丹) (born 1947 in Beijing, China with family roots in Pingxiang, Jiangxi, China) is a Chinese entrepreneur and economist. He is the chairman of the CITIC Group. He is also the chairman of CITIC International Financial Holdings, China CITIC Bank and CITIC Resources Holdings.
Kong was the vice-chairman and president of China Everbright Group, vice-chairman of China Everbright Limited and chairman of China Everbright Technology Limited. He has become the CITIC's chairman since 2006.
Both Kong's father and mother were high level Chinese Communist Party officials. He was known to be a leader of the original Red Guard group formed at the beginning of the Cultural Revolution.
Education
He holds a Master's Degree in Economics from the Chinese Academy of Social Sciences.
References
1947 births
Living people
Businesspeople from Beijing
20th-century Chinese economists
CITIC Group people
Chinese bankers
China Everbright Group people
Beijing No. 4 High School alumni
Economists from Beijing |
This is a list of Romanian film and theatre directors. It includes some foreign-born film and theatre directors who have worked or lived in Romania.
A
Haig Acterian
Dan Alexe
Mitch Anderson
Victor Antonescu
B
Paul Barbăneagră
Andrei Blaier
Elisabeta Bostan
Ion Bostan
Lucian Bratu
C
Paul Călinescu
Virgil Calotescu
Ion Filotti Cantacuzino
Nae Caranfil
Ion Caramitru
Octav Chelaru
Liviu Ciulei
Dinu Cocea
Ioan Mihai Cochinescu
Mihai Constantinescu
Stefan Constantinescu
D
Mircea Daneliuc
Iosif Demian
George Dorobanțu
Mircea Drăgan
F
Vlad Feier
G
Emil Gârleanu
M
Manole Marcus
Horaţiu Mălăele
Iulian Mihu
Cătălin Mitulescu
Anghel Mora
George Motoi
Vlad Mugur
Mihai Măniuțiu
N
Gheorghe Naghi
Doru Năstase
Jean Negulesco
Cristian Nemescu
Sergiu Nicolaescu
P
Lucian Pintilie
Corneliu Porumboiu
Dan Puric
S
Andrei Șerban
Florin Șerban
V
Vasile Vasilache
Mircea Veroiu
Gheorghe Vitanidis
Z
Florin Zamfirescu
See also
Cinema of Romania
Lists of film directors by nationality
Film directors
Performing arts in Romania
Theatre-related lists |
Children of the Corn III: Urban Harvest is a 1995 American slasher film, directed by James D. R. Hickox, and starring Daniel Cerny, Jim Metzler, Nancy Grahn, and Mari Morrow. It is the third film in the Children of the Corn series, and focuses on two mysterious brothers who are adopted from rural Nebraska and brought to Chicago; a chain of deadly occurrences surrounding the family follows, involving a cult in which the younger brother is a follower. Children of the Corn III marked the film debuts of Nicholas Brendon, Ivana Miličević, and Charlize Theron. Ed Grady reprises his role as Dr. Richard Appleby from the first sequel via a flashback sequence to Children of the Corn II: The Final Sacrifice.
The film was followed by an unrelated sequel, titled Children of the Corn IV: The Gathering (1996).
Plot
Eli and Joshua are being taken into foster care with William and Amanda Porter of Chicago after the death of their father, who was killed by Eli. The two boys do not mix well with a home in modern Chicago; their formal, Amish-like clothes from Gatlin, Eli's fire-and-brimstone prayer at dinner, and them bringing a suitcase full of corn to Chicago strike their new parents and neighbors as unusual. On his first night in Chicago, after everyone else has gone to sleep, Eli quietly leaves the Porters', taking his corn-filled suitcase, and heads to an empty factory on the other side of the backyard fence. There he prays to "He Who Walks Behind the Rows" and plants corn seeds on the factory grounds; rows of corn appear almost instantly.
The next day the boys start school, and Eli nearly gets into a fight with T-Loc, a student in Joshua's grade, and harshly criticizes Joshua for playing basketball with some of the other students. Disgusted with their classmates' modern lifestyle, Eli decides to bring He Who Walks Behind the Rows to Chicago, which soon kills a homeless man who finds the cornfield. Joshua makes friends with neighbors Maria and Malcolm and spends less time with Eli.
The social worker who brought Eli and Joshua to the Porters' discovers that Eli was originally adopted from Gatlin, Nebraska (the town from the first film) and that he has not aged since 1964. She tries to warn the Porters, but Eli quickly burns her alive. Amanda notices Eli's strange mannerisms, and when she tries to cut down his cornfield it attacks her. She attempts to escape, but she trips on a pole and her head is impaled on a broken pipe, killing her instantly. William finds the cornfield Eli has planted and realizes that with its seemingly-perfect natural invulnerability to disease, ability to grow out-of-season and in the worst of soil, it could be a highly-marketable product. Despite his wife's death, which Eli arranged, William finds backers and looks forward to the massive profits Eli's strain of corn will bring.
Eli neglects to inform his foster father of another property the corn possesses: it turns children who eat it into followers of "He Who Walks Behind the Rows". Eli decisively sways his high-school classmates towards his beliefs, turning them against the principal and directing them to abandon basketball and other previously-typical activities. Alarmed at Eli's converting of the students, the principal attempts to inform other staff, but they don't believe him, as Eli's efforts have actually restored order at the school to a degree few had thought possible.
By the time Joshua realizes the full truth, Eli has killed their foster parents, the school principal, and Malcolm and Maria's parents, and he now has full control of his fellow students. Joshua confronts him, revealing that he has gone back to Gatlin (which resulted in Malcolm's death) and found the Bible of "He Who Walks Behind the Rows" which Eli holds sacred and, together with his own body, can survive indefinitely if one is intact. Eli roars "Give me the book!" and charges. Joshua throws it down, and as Eli scrambles to pick it up, Joshua stabs Eli and the book with a sickle, destroying both.
After Eli dies, "He Who Walks Behind the Rows" rises from the cornfield: a grotesque monster with several tentacles. It kills several of Eli's followers who have slipped from his control in horrific ways, including T-Loc. After a brief struggle, Joshua repeatedly stabs the sickle at the monster's lower body, which resembles a large tree root sticking out of the ground. "He Who Walks Behind the Rows" collapses and dies.
As the film closes, the first shipment of Eli's corn arrives in Germany, the beginning of shipments all over the world.
Cast
Daniel Cerny as Eli Porter
Ron Melendez as Joshua Porter
Michael Ensign as Father Frank Nolan
Jon Clair as Malcolm Elkman
Mari Morrow as Maria Elkman
Duke Stroud as Earl
Rance Howard as Employer
Brian Peck as Jake Witman
Nancy Lee Grahn as Amanda Porter
Ed Grady as Dr. Richard Appleby
Jim Metzler as William Porter
Garvin Funches as T-Loc
Yvette Freeman as Samantha
Charlize Theron as Eli's follower (uncredited)
Ivana Miličević as Eli's follower/Acolyte
Nicholas Brendon as Basketball Player One
Production
Principal photography began in December 1993 and ended on January 15, 1994. The special effects for the film were supervised by Kevin Yagher.
Release
Home media
Children of the Corn III: Urban Harvest was the first film in the series made under Dimension Films and Miramax Films, who purchased the rights to the series and distributed the seven sequels to the original two films. It was also the first film in the series to be released direct-to-video, arriving at U.S. video stores on September 12, 1995 on VHS and DVD.
The film debuted on Blu-ray on May 10, 2011 via Echo Bridge Entertainment.
Reception
J.R. Taylor of Entertainment Weekly gave the film a B-rating: "This latest installment — the best of the Stephen King-derived series — offers some unexpected plot developments and surprisingly chilling gore. But fear not, it's unlikely Urban Harvest will cause nightmares, due to its hilariously inept climax. When the humongous corn creature shakes a screaming girl in its goo paws, the victim looks suspiciously like a Barbie doll". TV Guide awarded the film two out of five stars, praising the performances, and adding: "Against the odds, this horror series (initially based on a Stephen King short story) has actually improved over time to the point where this third installment is a creditable if far-fetched chiller".
See also
Children of the Corn (film series)
List of adaptations of works by Stephen King
References
External links
1995 films
Children of the Corn
1995 horror films
Children of Corn 3
Miramax films
Dimension Films films
Direct-to-video sequel films
Direct-to-video horror films
Films about cults
Films about religion
American slasher films
1990s English-language films
Films set in Chicago
Films scored by Daniel Licht
Films directed by James D. R. Hickox
1990s American films |
Since 1993, the Royal Australian Navy has operated four Australian-designed and built Landing Craft, Vehicle and Personnel (similar in size and concept to the World War II LCVP) from the landing ship, heavy , replenishment oiler , LSD HMAS Choules and Pacific support vessel ADV Reliant. These aluminum craft were built by Geraldton Boat Builders and can carry up to 36 personnel or a Land Rover with a half-ton trailer. They are maintained for the RAN by the firm DMS Maritime. As of 2022, T4 and T5 are carried by ADV Reliant.
References
Amphibious warfare vessels of the Royal Australian Navy
Naval ships of Australia
Landing craft |
```java
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
*/
package jdk.graal.compiler.jtt.except;
import org.junit.Test;
import jdk.graal.compiler.jtt.JTTTest;
public class BC_athrow0 extends JTTTest {
static Throwable throwable = new Throwable();
public static int test(int arg) throws Throwable {
if (arg == 2) {
throw throwable;
}
return arg;
}
@Test
public void run0() throws Throwable {
runTest("test", 0);
}
@Test
public void run1() throws Throwable {
runTest("test", 2);
}
}
``` |
Sushruta, or Suśruta (Sanskrit: सुश्रुत, IAST: , ) is the listed author of the Sushruta Samhita (Sushruta's Compendium), a treatise considered to be one of the most important surviving ancient treatises on medicine and is considered a foundational text of Ayurveda. The treatise addresses all aspects of general medicine, but the impressive chapters on surgery have led to the false impression that this is its main topic. The translator G. D. Singhal dubbed Suśruta "the father of plastic surgery" on account of these detailed accounts of surgery.
It is generally accepted by scholars that there were several ancient authors collectively called "Suśruta" who contributed to this text.
The Compendium of Suśruta locates its author in Varanasi, India.
Authorship
Rao in 1985 suggested that the author of the original "layer" was "elder Sushruta" (Vrddha Sushruta), although this name appears nowhere in the early Sanskrit literature. The text, states Rao, was redacted centuries later "by another Sushruta, then by Nagarjuna, and thereafter Uttara-tantra was added as a supplement". It is generally accepted by scholars that there were several ancient authors called "Suśruta" who contributed to this text.
Date
The early scholar Rudolf Hoernle proposed that some concepts from the Suśruta-Saṃhitā could be found in the Śatapatha-Brāhmaṇa, which he dates to the 600 BCE. However, during the last century, scholarship on the history of Indian medical literature has advanced substantially, and firm evidence has accumulated that the Suśruta-saṃhitā is a work of several historical layers. Its composition may have begun in the last centuries BCE, completed in its present form by another author who redacted its first five chapters and added the long, final chapter, the "Uttaratantra". It is likely that the Suśruta-saṃhitā was known to the scholar Dṛḍhabala, a contributor to the Charaka Samhita that wrote between the fourth and fifth centuries CE. Additionally, several ancient Indian authors used the name "Suśruta", resulting in potential misattribution.
Citations
In 1907, an influential translator of the ancient Indian epic The Mahabharata, named Bhishagratna, argued that Suśruta was one of the sons of the ancient sage Vishvamitra. Bhisagratna also asserted that Sushruta was the name of the clan to which Vishvamitra belonged. In Chapter 7 of the five-volume History of Indian Medical Literature, published in 1999, physician-scholar Gerrit Jan Meulenbeld covers a variety of theories on Suśruta's identity and the Sushruta Samhita's publication history.
The name Suśruta is listed as one of ten Himalayan sages in a treatise on medicinal garlic that was included in the sixth century CE Bower Manuscripts.
Followers
Sushruta attracted a number of disciples who were known as Saushrutas and required to study for six years before beginning hands-on surgical training. Before starting their training, they took a solemn oath to devote themselves to healing and to do no harm to others, often compared to Hippocratic Oath. After the students had been accepted by Sushruta, he would instruct them in surgical procedures by having them practice cutting on vegetables or dead animals to perfect the length and depth of an incision. Once students had proven themselves capable with vegetation, animal corpses, or with soft or rotting wood – and had carefully observed actual procedures on patients – they were then allowed to perform their own surgeries. These students were trained by their master in every aspect of the medical arts, including anatomy.
Sushruta on medicine and physicians
Sushruta wrote the Sushruta Samhita as an instruction manual for physicians to treat their patients holistically. Disease, he claimed (following the precepts of Charaka), was caused by imbalance in the body, and it was the physician's duty to help others maintain balance or to restore it if it had been lost. To this end, anyone who was engaged in the practice of medicine had to be balanced themselves. Sushruta describes the ideal medical practitioner, focusing on a nurse, in this way:That person alone is fit to nurse, or to attend the bedside of a patient, who is cool-headed and pleasant in his demeanor, does not speak ill of anyone, is strong and attentive to the requirements of the sick, and strictly and indefatigably follows the instructions of the physician. (I.34)
Legacy
Sushruta's medical prowess is exhibited through his writings on rhinoplasty, involving nasal reconstructions using skin from the patient's forehead or cheek, often for criminals punished with amputations. Based on reports in the October 1794 edition of The Gentleman's Magazine, published in London, Indians maintained Sushruta's surgical practices until the late 18th century.
See also
Vagbhata
Charaka
Ayurveda
References
External links
Sutrasthana, Nidanasthana, Sharirasthana, Cikitsasthana, Kalpasthana, Uttaratantra: English translation, proofread, correct spelling, interwoven glossary
The Suśruta Project, a Canadian research project at the University of Alberta aimed at establishing a new Sanskrit text of the Suśrutasaṃhitā based on recently discovered medieval manuscripts in Nepal
Ayurvedacharyas
Indian surgeons
Ancient Indian physicians
Ancient ophthalmologists
Ancient Indian writers
Scientists from Varanasi
Scholars from Varanasi
Writers from Varanasi
8th-century BC Hindus |
```java
/*
This file is part of the iText (R) project.
Authors: Apryse Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at path_to_url For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
along with this program. If not, see <path_to_url
*/
package com.itextpdf.io.font.constants;
public final class FontWeights {
private FontWeights() {
}
// Font weight Thin
public static final int THIN = 100;
// Font weight Extra-light (Ultra-light)
public static final int EXTRA_LIGHT = 200;
// Font weight Light
public static final int LIGHT = 300;
// Font weight Normal
public static final int NORMAL = 400;
// Font weight Medium
public static final int MEDIUM = 500;
// Font weight Semi-bold
public static final int SEMI_BOLD = 600;
// Font weight Bold
public static final int BOLD = 700;
// Font weight Extra-bold (Ultra-bold)
public static final int EXTRA_BOLD = 800;
// Font weight Black (Heavy)
public static final int BLACK = 900;
public static int fromType1FontWeight(String weight) {
int fontWeight = NORMAL;
switch (weight.toLowerCase()) {
case "ultralight":
fontWeight = THIN;
break;
case "thin":
case "extralight":
fontWeight = EXTRA_LIGHT;
break;
case "light":
fontWeight = LIGHT;
break;
case "book":
case "regular":
case "normal":
fontWeight = NORMAL;
break;
case "medium":
fontWeight = MEDIUM;
break;
case "demibold":
case "semibold":
fontWeight = SEMI_BOLD;
break;
case "bold":
fontWeight = BOLD;
break;
case "extrabold":
case "ultrabold":
fontWeight = EXTRA_BOLD;
break;
case "heavy":
case "black":
case "ultra":
case "ultrablack":
fontWeight = BLACK;
break;
case "fat":
case "extrablack":
fontWeight = BLACK;
break;
}
return fontWeight;
}
public static int normalizeFontWeight(int fontWeight) {
fontWeight = (fontWeight/100)*100;
if (fontWeight < FontWeights.THIN) return FontWeights.THIN;
if (fontWeight > FontWeights.BLACK) return FontWeights.BLACK;
return fontWeight;
}
}
``` |
When skin is blanched, it takes on a whitish appearance as blood flow to the region is prevented. This occurs during (and is the basis of the physiologic test known as) diascopy.
Blanching of the fingers is also one of the most clinically evident signs of Raynaud's phenomenon.
Blanching is prevented in gangrene as the red blood corpuscles are extravasated and impart red color to the gangrenous part.
See also
Diascopy
Pallor
References
Dermatologic terminology |
Hilone Dinnissen (born 8 June 1965) is a former Dutch cricketer whose international career for the Dutch national side spanned from 1985 to 1991. A wicket-keeper, she played eight One Day International (ODI) matches, including games at the 1988 World Cup. Her club cricket was played for Kampong.
As an 18-year-old, Dinnissen appeared for a Young Netherlands team at the 1983 Centenary Tournament in Utrecht, which also featured the senior teams of Denmark, Ireland, and the Netherlands. Her own senior debut came in August 1985, during a tour of England, while her ODI debut was made at the 1988 World Cup in Australia. With Isabelle Koppe-van Dishoek the first-choice wicket-keeper, Dinnissen was initially used solely as a middle-order batsman. However, in the games against Ireland and England later in the tournament, she did keep wicket (in Koppe-van Dishoek's absence). Against England, she top-scored with 28 runs from a team total of 98/9, making what was to be her highest ODI score. After the World Cup, Dinnissen played only three more ODIs – one in the 1990 European Championship, and two in the 1991 edition. She played only as a batsman at those tournaments, with Karen van Rijn keeping wicket.
References
External links
Hilone Dinnissen at CricketArchive
Hilone Dinnissen at ESPNcricinfo
1965 births
Living people
Dutch women cricketers
Netherlands women One Day International cricketers
Wicket-keepers |
Vez may refer to:
People
Irantzu Garcia Vez (born 1992), Spanish curler
Jean-Luc Vez (1957–2017), Swiss administrative lawyer and head of the Federal Office of Police of Switzerland
León Ávalos y Vez (1906–1991), Mexican mechanical engineer
Sergio Vez (born 1994), Spanish curler
El Vez, stage name of Mexican-American singer-songwriter and musician Robert Alan Lopez (born 1960)
Places
Věž, a municipality and village in the Czech Republic
Vez, Oise, a commune in France
Vez River, Portugal
See also
Tal Vez (disambiguation)
Vèze, Cantal, France |
Jeremy Shelley (born October 25, 1990) is a former American football placekicker. He played college football at Alabama.
High school career
Shelley attended Needham B. Broughton High School in Raleigh, North Carolina, playing varsity football and varsity soccer all four years. In his senior season at Broughton, he made 10 out of 13 field goal attempts including his longest attempt of 48 yards. He also played on two North Carolina High School Athletic Association state championship soccer teams in 2006 and 2007, with the 2007 team finishing ranked number one in the country. On October 9, 2008, Shelley earned the WRAL Extra Effort Award presented by Tom Suiter.
College career
In his freshman season, Shelley was the backup placekicker for the Crimson Tide behind Leigh Tiffin and made only one appearance in which he missed his only field goal attempt along with making his only extra point attempt during that season. On January 9, 2012, he set a BCS National Championship Game record and a career-high for field goals made against LSU in which he made five of his seven attempts. In the 2012 BCS National Championship Game, Shelley made kicks of 23, 34, 41, 35 and 44 yards. In his junior and senior years, Shelley was one of twenty semifinalists for the Lou Groza Award at the conclusion of the season. He finished his college career with a total 44 made field goals out of 55 field goal attempts and 172 PATs (an Alabama record), ranking him the 5th all-time leading scorer in Alabama history. In his Senior year, he was perfect, making every field goal and extra point he attempted, earning him the Vlade Award presented by the Touchdown Club of Columbus as the nation's most accurate kicker.
Professional career
After going undrafted in the 2013 NFL Draft, Shelley was signed as a free agent by the Atlanta Falcons. He was later waived from the Atlanta roster on August 31, 2013.
On March 26, 2015, Shelley was assigned to the Arizona Rattlers of the Arena Football League.
References
External links
Atlanta Falcons bio
Alabama Crimson Tide bio
1990 births
Living people
American football placekickers
Alabama Crimson Tide football players
Atlanta Falcons players
Arizona Rattlers players
Players of American football from Raleigh, North Carolina
Needham B. Broughton High School alumni |
Malek Aït Alia (born August 15, 1977) is a former footballer who played as a defender for various French clubs and Algerian side USM Alger. Born in France, he represented Algeria at international level.
International career
On April 24, 2003, Aït-Alia made his debut for the Algerian National Team as a starter in a 3-1 friendly win over Madagascar. On April 28, 2004, he played his second game, starting in a 1-0 loss in a friendly against China.
National team statistics
References
1977 births
Living people
Algerian men's footballers
Algeria men's international footballers
Amiens SC players
Clermont Foot players
FC Mulhouse players
Men's association football defenders
French men's footballers
French sportspeople of Algerian descent
Kabyle people
Ligue 2 players
Montpellier HSC players
Footballers from Mulhouse
Racing Club de France Football players
Stade de Reims players
Stade Lavallois players
USM Alger players
Algerian expatriate men's footballers |
Stalmine is a village in the civil parish of Stalmine-with-Staynall, in the Wyre borough of Lancashire, England, in a part of the Fylde known as Over Wyre. The village is located on a small hill on the A588, the main road between Hambleton and Lancaster, with the highest level 75 ft above sea level. The village name has been spelled Stalmin (in 1205) and Stalemynne (in 1278). The village had a population of 1,087 at the 2011 Census.
Village history
The name is thought to mean the pool or stream at the mouth of the river, from the Old English and the Old Norse .
The village history dates back to 1066 when Tostig Godwinson held it as part of his Preston Fee. The first recorded possessor was Robert de Stalmine in 1165. The chapel of Stalmine was first mentioned about 1200 and a cemetery was consecrated in 1230. The chapel was rebuilt in 1806 when it was renamed St James. In 1689 Stalmine had a Presbyterian meeting house, which in 1717 was stated to be located "very near to the chapel".
Amenities
The village church, St. James Church (Church of England) on Hallgate Lane, has a sundial dated 1690. The village has one pub (the Seven Stars), which is located at the top of the hill in the village, and one school, Stalmine County Primary School. Stalmine Hall Residential Park is located near the church, in the grounds of the 19th century Stalmine Hall.
Sport
The village is home to the amateur football club Wyre Villa, who play in the West Lancashire League, part of the English football league system. They play their home games at Hall Gate Park on the edge of the village. The most successful season in the club's history to date was in 1996-97 when they were West Lancashire League champions. Blackpool F.C. Ladies also play their home games at Hall Gate Park.
See also
Listed buildings in Stalmine-with-Staynall
References
External links
Stalmine Primary School
Stalmine-with-Staynall Parish Council
Villages in Lancashire
Geography of the Borough of Wyre
The Fylde |
Yuzhny () is a rural locality (a settlement) in Medovskoye Rural Settlement, Bogucharsky District, Voronezh Oblast, Russia. The population was 413 as of 2010. There are 8 streets.
Geography
Yuzhny is located 36 km southeast of Boguchar (the district's administrative centre) by road. Medovo is the nearest rural locality.
References
Rural localities in Bogucharsky District |
Erythros Stavros (, ), meaning "Red Cross", is a neighborhood of Athens, located between the districts of Ambelokipoi, Ellinoroson and Girokomeio. It was named after the Erythros Stavros Hospital, which is located in the center. It is also considered part of the Ambelokipi neighborhood. Apart from the hospital, this district is home to the Police School and the Ministry of Justice, Transparency and Human Rights. It is serviced by the Line 3 of Athens Metro and a plurality of bus lines.
References
Neighbourhoods in Athens |
Asaph Clayton Vanderwater Elston (September 9, 1845 – July 28, 1914) was a member of the Wisconsin State Assembly. He was born on September 9, 1845, in Unionville, Orange County, New York. Occupations he held include banker and merchant. He died on July 28, 1914, in Muscoda, Wisconsin. He was elected to the Assembly in 1888 as a Republican.
References
External links
1845 births
1914 deaths
Politicians from Orange County, New York
People from Grant County, Wisconsin
Republican Party members of the Wisconsin State Assembly
American bankers
19th-century American merchants |
45 Cancri is a binary star system in the zodiac constellation of Cancer, located 680 light-years away from the Sun. It has the Bayer designation A1 Cancri; 45 Cancri is the Flamsteed designation. It is visible to the naked eye as a faint, white-hued star at an apparent visual magnitude of 5.62. The pair form a double-lined spectroscopic binary with an orbital period of and an eccentricity of 0.46. They are drifting closer to the Earth with a heliocentric radial velocity of −6 km/s.
The primary, designated component A, is an aging giant star with a stellar classification of G8 III, but has most likely not yet made multiple ascents up the red giant branch. It has 3.11 times the mass of the Sun and has expanded to 14 times the Sun's radius. The star is radiating 210 times the luminosity of the Sun from its enlarged photosphere at an effective temperature of . The less evolved secondary, component B is likewise a giant star, having a class of A3 III. It has three times the mass of the Sun and shines with 191 times the Sun's luminosity.
References
A-type giants
G-type giants
Binary stars
Cancer (constellation)
Cancri, A1
BD+13 1972
Cancri, 45
074288
042795
3450 |
Bishunpur Vishram is a village in Pachperwa block, Balrampur district, Uttar Pradesh, India.
Demographics
As of 2011 Indian Census, Bishunpur Vishram had a total population of 2,405, of which 1,196 were males and 1,209 were females.
References
Villages in Balrampur district, Uttar Pradesh |
Woody Shaw: The Complete Muse Sessions is a 7-CD box set compilation of recordings by jazz trumpeter, composer and bandleader Woody Shaw, released in 2013 by Mosaic Records.
The box set includes all nine of Woody Shaw's albums for Muse Records that were originally released during the periods between 1974–1977 and 1983–1987. The collection features an accompanying booklet written by Shaw's son, Woody Louis Armstrong Shaw III, who co-produced the set. Includes new photographs and remastered sound by Malcolm Addey.
Reception
Matt Collar of AllMusic stated that the Muse albums "represent not only some of the most important recordings of Shaw's career, but some of the most influential and individualistic artistic statements by a jazz artist in the 20th century."
CD and Track Listing
References
2011 compilation albums
Woody Shaw compilation albums
Mosaic Records compilation albums
Albums produced by Michael Cuscuna |
Hatch Court in the parish of Hatch Beauchamp, in Somerset, England, is a grade I listed mansion built in about 1755 in the Palladian style with Bath Stone by the wool merchant John Collins to the design of Thomas Prowse. The site had been occupied since the mediaeval era by various forms of the manor house of the manor of Hatch, the caput of an important feudal barony first held by the Anglo-Norman de Beauchamp family in the 11th century.
History
John Collines was a wool merchant who built the house in about 1755. He employed as his architect Thomas Prowse a Member of Parliament who designed houses for his friends and had previously designed the nearby Temple of Harmony and had been consulted regarding the building of Hagley Hall in Worcestershire.
Architecture
The two-storey Bath stone building is in the Palladian style with four square angle towers each of three storeys. The main entrance is via a loggia of five round-headed arches. The interior includes a large hall and a staircase with stone treads and wrought iron balusters.
Outbuildings and grounds
The gardens contain a walled vegetable garden. During the 18th century extensive pleasure gardens existed which included a grotto with a pool and fireplace.
The stable block was built in about 1820 following the demolition of the original stable block designed by Prowse. At the same time a horse engine house was built as a horse mill to power farm machinery, since used for storage, but some of the original machinery including the drive shaft is still in situ.
The gardens were restored by Dr Robin Odgers and his wife Janie, who occupied the house from 1984 to its sale in 2000. There are listed, Grade II, on the Register of Historic Parks and Gardens of special historic interest in England.
Museum
The house once contained a small military museum commemorating the life and work of Brigadier Andrew Hamilton Gault, a decorated Boer War hero who served as Member of Parliament for Taunton and as a member of the Quebec Chamber of Commerce. He was the founder of the last privately raised regiment in the British Empire, the Princess Patricia's Canadian Light Infantry. Hamilton Gault was buried on the estate. His wife continued to live at Hatch Court until 1972.
See also
List of Grade I listed buildings in Taunton Deane
Sources
Sanders, I.J. English Baronies: A Study of their Origin and Descent 1086–1327, Oxford, 1960, p. 51, Hatch Beauchamp, Somerset
Batten, John, The Barony of Beauchamp of Somerset, published in Proceedings of the Somerset Archaeological and Natural History Society, Vol.36.
Cookson, Christopher, Hatch Beauchamp Church, section: Historical Note on the Church and its Associations, 1972
Burke's Genealogical and Heraldic History of the Landed Gentry, 15th Edition, ed. Pirie-Gordon, H., London, 1937, p. 872, Gault of Hatch Court
References
Houses completed in 1755
Grade I listed buildings in Taunton Deane
Grade I listed houses in Somerset
Grade II listed parks and gardens in Somerset
Gardens in Somerset |
California South Bay University is a BPPE (Bureau for Private Post-secondary Education) approved private educational institution (School Code: 13317491) based in Sunnyvale, California.
California South Bay University offers the following degree programs: Master of Business Administration, Master of Science in Computer Science.
References
Universities and colleges established in 2007
Education in Sunnyvale, California
Universities and colleges in Santa Clara County, California
Private universities and colleges in California
2007 establishments in California |
Bidak-e Bala (, also Romanized as Bīdak-e Bālā; also known as Bīdak-e Vasaţī) is a village in Eskelabad Rural District, Nukabad District, Khash County, Sistan and Baluchestan Province, Iran. At the 2006 census, its population was 68, in 19 families.
References
Populated places in Khash County |
Manhattan Blues is an album by saxophonist Ricky Ford.
Recording and music
Manhattan Blues was recorded on March 4, 1989, in New York City. It is a quartet recording, with leader Ricky Ford (tenor sax) joined by Jaki Byard (piano), Milt Hinton (bass), and Ben Riley (drums). Six of the nine tracks are Ford originals. The album was released on CD by Candid Records.
Reception
The Los Angeles Times reviewer commented that Ford combined "modern and traditional values into a very appealing style". For AllMusic, Scott Yanow summarised it as "Stimulating music".
Track listing
"In Walked Bud" (Thelonious Monk)
"Misty" (Erroll Garner, Johnny Burke)
"Ode to Crispus Attucks" (Ricky Ford)
"Portrait of Mingus" (Ford)
"Bop Nouveau" (Ford)
"My Little Strayhorn" (Ford)
"Manhattan Blues" (Ford)
"Land Preserved" (Ford)
"Half Nelson" (Miles Davis)
Personnel
Ricky Ford – tenor sax
Jaki Byard – piano
Milt Hinton – bass
Ben Riley – drums
References
1989 albums
Candid Records albums
Ricky Ford albums |
The College of Liberal Arts and Sciences at ASU is the largest of the 17 independent school units at Arizona State University. Students majoring in The college make up 31 percent of all Tempe campus students.
The college is home to three academic divisions including the humanities, natural sciences and social sciences. Within these divisions The college is home to 21 interdisciplinary schools and departments and 50 research centers and institutes. The college offers 100+ undergraduate majors and 150+ graduate degrees.
As of fall 2020, The college's total student enrollment was 16,241. As of fall 2019, The college's first-year retention rate was 86%, and its four-year graduation rate was 57%.
Organization
The College of Liberal Arts and Sciences is headed by Dean Patrick Kenney. Each of the three academic divisions is led by a divisional dean:
Dean Jeffrey Cohen, Humanities
Dean Kenro Kusumi, Natural Sciences
Location
The College of Liberal Arts and Sciences is located within Armstrong Hall on McAllister Avenue, as part of ASU's Tempe campus.
Notable people
Faculty*
Greg Asner, National Academy of Sciences (NAS) member, 2013.
H. Russell Bernard, NAS member, 2010.
Jane Buikstra, NAS member, 1987.
Natalie Diaz, MacArthur Fellow, 2018; Pulitzer Prize for Poetry, 2021.
Lindy Elkins-Tanton, NAS Arthur L. Day Prize and Lectureship, 2020; NAS member, 2021.
James Elser, NAS member, 2019.
Nancy Grimm, NAS member, 2019.
Michael Goodchild, NAS member, 2002.
Lee Hartwell, NAS member, 1987; The Nobel Prize in Physiology or Medicine, 2001.
Bert Hoelldobler, NAS member, 1998; Pulitzer Prize for General Nonfiction, 1991.
Mitchell Jackson, Pulitzer Prize for Feature Writing, 2021.
Michael Lynch, NAS member, 2009.
Alexandra Navrotsky, NAS member, 1993.
Rebecca Sandefur, MacArthur Fellow, 2018.
Anne Stone, NAS member, 2016.
Polly Wiessner, NAS member, 2014.
Frank Wilczek, MacArthur Fellow, 1982; NAS member, 1990; The Nobel Prize in Physics, 2004.
*This list includes only current and living faculty at The college who have received a Nobel Prize, Pulitzer Prize or MacArthur Fellowship or who are members of the National Academy of Sciences.
Alumni
View outstanding and accomplished alumni at The College Alumni Network webpage: https://thecollege.asu.edu/alumni/network.
Academic Units
Aerospace Studies
American Indian Studies
Department of English
Department of Physics
Department of Psychology
Hugh Downs School of Human Communication
Military Science
Naval Science
School of Civic and Economic Thought and Leadership
School of Earth and Space Exploration
School of Geographical Sciences and Urban Planning
School of Historical, Philosophical and Religious Studies
School of Human Evolution and Social Change
School of International Letters and Cultures
School of Life Sciences
School of Mathematical and Statistical Sciences
School of Molecular Sciences
School of Politics and Global Studies
School of Social and Family Dynamics
School of Social Transformation
School of Transborder Studies
Research Centers and Institutes
American Indian Policy Institute
Arizona Center for Medieval and Renaissance Studies
Beyond: Center for Fundamental Concepts in Science
Biodiversity Knowledge Integration Center
Center for Archaeology and Society
Center for Asian Research
Center for Behavior, Institutions and the Environment
Center for Bioarchaeological Research
Center for Biodiversity Outcomes
Center for Bioenergy and Photosynthesis
Center for Biological Physics
Center for Biology and Society
Center for Child and Family Success
Center for Digital Antiquity
Center for Education Through Exploration
Center for Evolution and Medicine
Center for Gender Equity in Science and Technology
Center for Global Discovery
Center for Global Health
Center for Imagination in the Borderlands
Center for Indian Education
Center for Jewish Studies
Center for Meteorite Studies
Center for Political Thought and Leadership
Center for Public Humanities
Center for Social Dynamics and Complexity
Center for Strategic Communication
Center for the Advanced Study and Practice of Hope
Center for the Study of Economic Liberty
Center for the Study of Institutional Diversity
Center for the Study of Religion and Conflict
Center for Work and Democracy
Center on the Future of War
Chinese Language Flagship Center
Desert Humanities Initiative
Global Drylands Center
Hispanic Research Center
Humanities Lab
Institute for Humanities Research
Institute for Social Science Research
Institute of Human Origins
Interplanetary Initiative
Lincoln Center for Applied Ethics
Melikian Center: Russian, Eurasian and East European Studies
Project Humanities
REACH Institute
Simon A. Levin Mathematical, Computational and Modeling Sciences Center
Spatial Analysis Research Center
Urban Climate Research Center
Virginia G. Piper Center for Creative Writing
Rankings
The following rankings are for Arizona State University overall. Rankings directly connected to disciplines and programs within The College of Liberal Arts and Sciences are listed.
Higher Education Research and Development Rankings (fiscal year 2018):
No. 1 in geological and earth sciences.
No. 1 in anthropology.
No. 4 in social sciences.
No. 5 in humanities.
No. 5 in political science and government.
U.S. News & World Report (2021):
No. 10 in undergraduate teaching
No. 10 in first-year experiences
4+1/Accelerated Programs at The College
Accelerated (4+1) degree programs streamline a student's path from an undergraduate program to a master's degree. By combining undergraduate and graduate coursework in their senior year for dual credit, students can potentially save up to an entire year of schooling and receive both degrees in as little as five years. Students can view available pathways at the accelerated degrees (4+1) website: https://thecollege.asu.edu/degrees/accelerated. This website is updated regularly as new accelerated (4+1) degree options are added.
References
External links
Arizona State University
Liberal arts colleges at universities in the United States
Universities and colleges established in 1954
1954 establishments in Arizona |
Sanford's white-eye (Zosterops lacertosus) is a species of bird in the family Zosteropidae. It is endemic to Nendo Island.
Its natural habitat is subtropical or tropical moist lowland forest. It is threatened by habitat loss. This species has a small population due to it being endemic to Nendo Island. This population seems to be declining because of their near threatened status since their habitat is being targeted for commercial purposes.
It is named after Leonard Cutler Sanford, a trustee of the American Museum of Natural History.
References
Sanford's white-eye
Birds of the Santa Cruz Islands
Endemic fauna of the Solomon Islands
Sanford's white-eye
Taxonomy articles created by Polbot
Endemic birds of the Solomon Islands |
Saint Bobo of Provence ( or Bobon, or Bobone; died 986) was a Frankish warrior and pilgrim from Noyers (Noghiers). He is known only from the anonymous biography Vita sancti Bobonis. He built a castle on a hill opposite the Muslim fortress of Fraxinet and led the Christians of Provence to victory in battle with the Muslims in an unknown year. During the battle he had a mystical experience and vowed, if victorious, to renounce war and become a pilgrim devoted to the care of orphans and widows. After the loss of his brother, he went on pilgrimage to Rome and died at Voghera in Lombardy.
Bobo is venerated as a saint in the Eastern Orthodox and Roman Catholic churches. His feast day is May 22 and he is the patron saint of cattle.
Notes
Sources
Further reading
986 deaths
Medieval French knights
Frankish warriors
Saints of West Francia
People from Provence
Year of birth unknown
10th-century Christian saints
10th-century people from West Francia |
Widnau is a municipality in the Wahlkreis (constituency) of Rheintal in the canton of St. Gallen in Switzerland.
History
In 1883 the municipality was created when it separated from Diepoldsau.
Geography
Widnau has an area, , of . Of this area, 34.2% is used for agricultural purposes, while 2.4% is forested. Of the rest of the land, 59.4% is settled (buildings or roads) and the remainder (4%) is non-productive (rivers or lakes).
It is on the Austrian border and has a border crossing via the Wiesenrainbrücke, a bridge over the Rhine. This road bridge also carries a track of the International Rhine Regulation Railway, a now preserved rail line formerly used in the management of the Rhine.
Coat of arms
The blazon of the municipal coat of arms is Or a bar wavy Azure base seme of Tufts Vert and overall a Willow pollarded of the last eradicated and trunked Gules.
Demographics
Widnau has a population (as of ) of . , about 25.0% of the population was made up of foreign nationals. Of the foreign population, (), 153 are from Germany, 205 are from Italy, 685 are from ex-Yugoslavia, 246 are from Austria, 165 are from Turkey, and 322 are from another country. Over the last 10 years the population has grown at a rate of 12.9%. Most of the population () speaks German (88.0%), with Albanian being second most common ( 2.8%) and Serbo-Croatian being third ( 1.7%). Of the Swiss national languages (), 6,574 speak German, 22 people speak French, 117 people speak Italian, and 8 people speak Romansh.
The age distribution, , in Widnau is; 1,041 children or 13.9% of the population are between 0 and 9 years old and 990 teenagers or 13.3% are between 10 and 19. Of the adult population, 942 people or 12.6% of the population are between 20 and 29 years old. 1,336 people or 17.9% are between 30 and 39, 1,031 people or 13.8% are between 40 and 49, and 905 people or 12.1% are between 50 and 59. The senior population distribution is 604 people or 8.1% of the population are between 60 and 69 years old, 424 people or 5.7% are between 70 and 79, there are 179 people or 2.4% who are between 80 and 89, and there are 18 people or 0.2% who are between 90 and 99.
there were 809 persons (or 10.8% of the population) who were living alone in a private dwelling. There were 1,637 (or 21.9%) persons who were part of a couple (married or otherwise committed) without children, and 4,299 (or 57.6%) who were part of a couple with children. There were 461 (or 6.2%) people who lived in single parent home, while there are 55 persons who were adult children living with one or both parents, 40 persons who lived in a household made up of relatives, 58 who lived household made up of unrelated persons, and 111 who are either institutionalized or live in another type of collective housing.
In the 2007 federal election the most popular party was the SVP which received 42.9% of the vote. The next three most popular parties were the CVP (24.9%), the FDP (11.5%) and the SP (9.9%).
In Widnau about 70.4% of the population (between age 25-64) have completed either non-mandatory upper secondary education or additional higher education (either university or a Fachhochschule). Out of the total population in Widnau, , the highest education level completed by 1,528 people (20.5% of the population) was Primary, while 2,736 (36.6%) have completed their secondary education, 786 (10.5%) have attended a Tertiary school, and 314 (4.2%) are not in school. The remainder did not answer this question.
Economy
, Widnau had an unemployment rate of 2.44%. , there were 19 people employed in the primary economic sector and about 9 businesses involved in this sector. 1,135 people are employed in the secondary sector and there are 111 businesses in this sector. 1,553 people are employed in the tertiary sector, with 272 businesses in this sector.
the average unemployment rate was 4.1%. There were 413 businesses in the municipality of which 114 were involved in the secondary sector of the economy while 296 were involved in the third.
there were 1,313 residents who worked in the municipality, while 2,590 residents worked outside Widnau and 1,731 people commuted into the municipality for work.
Religion
From the , 4,773 or 63.9% were Roman Catholic, while 1,181 or 15.8% belonged to the Swiss Reformed Church. Of the rest of the population, there were 2 individuals (or about 0.03% of the population) who belonged to the Christian Catholic faith, there were 175 individuals (or about 2.34% of the population) who belonged to the Orthodox Church, and there were 61 individuals (or about 0.82% of the population) who belonged to another Christian church. There were 3 individuals (or about 0.04% of the population) who were Jewish, and 619 (or about 8.29% of the population) who were Islamic. There were 32 individuals (or about 0.43% of the population) who belonged to another church (not listed on the census), and 340 (or about 4.55% of the population) belonged to no church, were agnostic or atheist. The remaining 284 individuals (or about 3.80% of the population) did not answer the question.
Weather
Widnau has an average of 137.8 days of rain or snow per year and on average receives of precipitation. The wettest month is July during which time Widnau receives an average of of rain or snow. During this month there is precipitation for an average of 13.3 days. The month with the most days of precipitation is June, with an average of 14.2, but with only of rain or snow. The driest month of the year is March with an average of of precipitation over 13.3 days.
References
External links
Widnau Online Official website
Municipalities of the canton of St. Gallen |
```xml
/*
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part of this software, including this file, may be copied, modified,
* propagated, or distributed except according to the terms contained in the
* LICENSE file.
*
* Removal or modification of this copyright notice is prohibited.
*/
import { BaseEvent, EventQueuer } from '../../base_event';
import { TerminatedStateAccount, terminatedStateSchema } from '../stores/terminated_state';
export class TerminatedStateCreatedEvent extends BaseEvent<TerminatedStateAccount> {
public schema = terminatedStateSchema;
public log(ctx: EventQueuer, chainID: Buffer, data: TerminatedStateAccount): void {
this.add(ctx, data, [chainID]);
}
}
``` |
Edward W. Stark (December 5, 1869 – January 9, 1935) was an American businessman and politician.
Born in Fish Lake Township, Chisago County, Minnesota, Stark was a merchant and lived in Harris, Minnesota. Stark served as Harris village assessor and treasurer. He also served on the Harris school board and was the board clerk. Stark served as probate judge for Chisago County. From 1901 to 1905, Stark served in the Minnesota House of Representatives and was a Republican. His father Lars Johan Stark also served in the Minnesota State Legislature. From 1925 to 1927, Stark served as Minnesota State Treasurer. Stark died suddenly in Center City, Minnesota while eating dinner.
Notes
External links
1869 births
1935 deaths
People from Chisago County, Minnesota
Businesspeople from Minnesota
State treasurers of Minnesota
School board members in Minnesota
Minnesota state court judges
Republican Party members of the Minnesota House of Representatives |
Louis Durant (25 September 1910, in Topeka, Kansas – 13 February 1972, in San Bernardino, California) was an American racecar driver. He was born "Durant Lewis" and grew up in Herington, Kansas. He changed his name when he began driving race cars.
Durant was a member of one of the most exclusive clubs in the world, the 100 Mile Per Hour Club. To qualify for membership, drivers were required to complete the Indianapolis 500-mile Race without relief while averaging over 100 miles an hour. Louis Durant drove a 1938 Alfa-Romeo 308 C Special Race Car in the Indianapolis 500 Race in 1946 and finished in 6th place.
Indy 500 results
References
1910 births
1972 deaths
Indianapolis 500 drivers
Sportspeople from Topeka, Kansas
Racing drivers from Kansas
People from Herington, Kansas |
In molecular biology, the EcoEI R protein C-terminal domain is a protein domain found at the C-terminus of both the R subunit of type I restriction enzymes and the Res subunit of type III restriction enzymes. The type I enzymes include EcoEI, which recognises 5'-GAGN(7)ATGC-3; the R protein (HsdR) is required for both nuclease and ATPase activity.
References
Protein families
Protein domains |
Eckhard Dagge (February 27, 1948, in Probsteierhagen, Germany – April 4, 2006, in Hamburg), was a professional boxer in the super welterweight (154 lb) division.
Eckhard Dagge was Germany's second world champion, after Max Schmeling, holding the World Boxing Council Light Middleweight title from 1976 to 1977. Dagge also held German National and European titles, during his ten-year career.
Background
Dagge was born in Probsteierhagen, Germany, near Kiel in 1946. He learned to fight in the bars and taverns of Hamburg. He would later embark on an amateur career, in which he won 66 out of 80 bouts, before falling short of making the 1972 Olympic Team.
Professional career
Dagge would win the German Middleweight title, in his 6th bout. Dagge would follow up with wins over notable, but faded fighters Denny Moyer and Manuel González. In 1974, Dagge challenged Jose Manuel Duran for the European Light Middleweight title, losing by 11th-round TKO. He came back the next year however, and stopped Duran in the 9th round, to win the title. He would defend this title once, before he lost it by decision to Vito Antuofermo.
Dagge earned a title shot against WBC Light Middleweight champion Elisha Obed on June 17, 1976. Dagge pulled off a stunning upset of Obed, winning by 10th-round TKO, to win the title in Berlin. Dagge was scheduled to defend his title against Sugar Ray Seales. However Seales pulled out a of the fight and former champion Emile Griffith stepped in as a replacement. The result was Dagge winning a controversial majority decision. He followed this up with a draw over England's Maurice Hope, a future world champion. Dagge then faced Australia-based Italian Rocky Mattioli on August 6, 1977, and was knocked out in the 5th round. Dagge would win six more bouts over lesser opposition until he was stopped by Brian Anderson in 1981.
Professional boxing record
Life after boxing
Dagge had a reputation as a wild man during his career and afterwards, as he struggled with alcoholism. Dagge worked with Universum after his pro career ended, training Dariusz Michalczewski, Michael Loewe, and Mario Schiesser. However, he was fired from his job as a manager in 1994, due to absenteeism and his problems with alcoholism. Dagge died on April 4, 2006, in Hamburg, Germany, after a battle with cancer.
See also
List of world light-middleweight boxing champions
References
External links
1948 births
2006 deaths
German male boxers
Sportspeople from Schleswig-Holstein
European Boxing Union champions
World Boxing Council champions
Middleweight boxers
World light-middleweight boxing champions |
Joseph Galea-Curmi (born 1 January 1964, in Balzan, Malta) is a Maltese clergyman and Catholic auxiliary bishop in the Metropolitan Archdiocese of Malta.
Life
Monsignor Joseph Galea-Curmi was born of the late Paul and Josette née Mifsud Bonnici, in Birkirkara, on 1 January 1964, and is the third of six children. Mgr Galea-Curmi was educated at Stella Maris School, Ħal Balzan, at the Secondary School of St Paul’s Missionary College, Rabat, and at St Aloysius College (Sixth Form), Birkirkara. He entered the Archbishop’s Seminary in 1982. After completing his studies and a Licentiate in Sacred Theology at the Faculty of Theology, he was ordained to the Roman Catholic priesthood by the Archbishop of Malta, Monsignor Joseph Mercieca, on 5 July 1991. Monsignor Galea-Curmi was sent to further his studies at the Pontifical Lateran University in Rome and obtained a doctorate in Pastoral Theology in 1998. His doctoral thesis was entitled “The Diocesan Synod as a Pastoral Event. A Study of the Post-Conciliar Understanding of the Diocesan Synod”.
After his studies in Rome, Monsignor Galea-Curmi was appointed assistant to the Pastoral Secretary of the Archdiocese of Malta and lecturer in Pastoral Theology at the University of Malta, where he lectures till today. He was also the coordinator of the Archdiocesan Synod held between 1999 and 2003. In 2005 he was appointed board member of the Diocesan Institute for Pastoral Formation, and ecclesiastical assistant of the Centesimus Annus Pro Pontifice Foundation (Malta) since 2008, till today.
In 2015, Archbishop Charles J. Scicluna appointed Monsignor Galea-Curmi Vicar General of the Archdiocese of Malta and Canon of the Cathedral Chapter.
In May 2019 Monsignor Galea-Curmi was admitted as an Ecclesiastical Knight Grand Officer of the Equestrian Order of the Holy Sepulchre of Jerusalem, Lieutenancy of Malta. The investiture ceremony was held at St John's Co-Cathedral and was presided by the Cardinal Grand Master Edwin Frederick O'Brien.
He carries out pastoral ministry at the Parish of the Annunciation in Ħal Balzan.
References
1964 births
Living people
21st-century Roman Catholic bishops in Malta
People from Birkirkara |
Radziejów County () is a unit of territorial administration and local government (powiat) in Kuyavian-Pomeranian Voivodeship, north-central Poland. It came into being on January 1, 1999, as a result of the Polish local government reforms passed in 1998. Its administrative seat and largest town is Radziejów, which lies south of Toruń and south-east of Bydgoszcz. The only other town in the county is Piotrków Kujawski, lying south of Radziejów.
The county covers an area of . As of 2019 its total population is 40,546, out of which the population of Radziejów is 5,578, that of Piotrków Kujawski is 4,456, and the rural population is 30,512.
Neighbouring counties
Radziejów County is bordered by Aleksandrów County to the north, Włocławek County to the east, Koło County and Konin County to the south, and Inowrocław County to the north-west.
Administrative division
The county is subdivided into seven gminas (one urban, one urban-rural and five rural). These are listed in the following table, in descending order of population.
References
Polish official population figures 2019
Land counties of Kuyavian-Pomeranian Voivodeship |
Duboka (rom. Adâncata) is a village in the municipality of Kučevo (rom. Cuciova), Serbia. According to the 2002 census, the village has a population of 1110 people.
References
Populated places in Braničevo District |
A Love to Last is a 2017 Philippine romantic family drama television series directed by Jerry Lopez-Sineneng, Frasco Mortiz, Richard I. Arellano, and Rory B. Quintos, starring Bea Alonzo, Ian Veneracion, and Iza Calzado, with an ensemble cast. The series premiered on ABS-CBN's Primetime Bida evening block and worldwide on The Filipino Channel from January 9 to September 22, 2017, replacing Magpahanggang Wakas and was replaced by The Good Son.
Plot
The story revolves around relationships in a diversified family setting.
Two different people, Andeng (Bea Alonzo), and Anton (Ian Veneracion), that will prove if two broken hearts can make their love last or not.
Cast and characters
Main cast
Bea Alonzo as Andrea "Andeng" Agoncillo-Noble, Anton's second wife and stepmother of Chloe, Lucas, and Kitty. She is about 18 years younger than Anton, but is mature beyond her years. Despite the age difference, she falls in love and marries Anton. She embraces her role as stepmother of three children and supportive wife of a successful and ambitious man, whose first marriage failed because of his ambition. A career woman herself, she successfully balances her priorities, and brings much happiness into Anton's life and his family's. Her biggest challenge is Grace, her husband's ex-wife, who is obsessed and determined to destroy their marriage, pushing Andrea's fears of infidelity and insecurities about her place in Anton's heart. This causes friction in their marriage. At some point, she almost gives up. But a chance conversation with an ex-fiancé opens her eyes to the important piece she was giving up, and that was the family she built with her husband and his children.
Ian Veneracion as Antonio "Anton" Noble IV. Devastated after Grace leaves him and their children, he picks up the pieces of his family's broken hearts. To fill the vacuum left by Grace's departure, he becomes a hands on Dad, restacks his priorities, and places his career and business second to his children's needs. Because of Anton's nurturing, the children adjust to a happy single parent household. After their annulment, he becomes the country's most eligible bachelor, but no one captures his heart except Andrea. Despite various challenges from their individual families, their relationship prevails and is finally accepted by everyone, except Grace Silverio, his haughty, self-serving, self-centered ex-wife. Anton is determined to protect his second marriage from Grace's manipulations and obsession to reclaim him. He's a kind hearted man, who finds it difficult to put his ex in her place, although he tries to many times. Despite all, Grace's manipulative tactic wears down Andrea, succeeding in breaking up the marriage, but he never gives up. Just when he and his children were taking off on their private plane to HK to fulfill a long promised vacation with his children, Andrea returns. They happily reconcile and the series ends with Andrea giving him the news of her pending pregnancy.
Iza Calzado as Grace Silverio, Anton's ex-wife and mother of Chloe, Lucas, and Kitty who she abandoned three years ago. Grace is a confident heiress who feels she needs to be free from the domineering and controlling personality of her husband. In reality, she has someone in LA. Despite Anton's pleas to return to Manila, and the risk of losing custody of her children, she insists on an annulment. She leaves behind a 15 year old, 13 year old and a 5 year old. Three years later, after two failed relationships, Grace decides to return home to reclaim her husband and children. She realizes that she is still in love with him and tries everything to drive a wedge between Anton and Andrea and her children, in the hope that she can win him back. Her obsession becomes a major concern for her children. Her last ditched effort to win Anton by confessing that she loves and wants him back fails. Anton rejects her, but she steals a passionate kiss which is unfortunately witnessed by Andrea. Anton's rejection, and Chloe's reprimand accusing her of destroying their family a second time, drives her to commit suicide. She survives and returns to the US to heal. Anton promises her that the children would spend summers with her.
Supporting/Extended/Guest cast
Julia Barretto as Chloe S. Noble. Anton and Grace's eldest child who fills the role of "mother-figure" to her siblings when Grace leaves them. She is in a relationship with Fort, but actually likes Tupe. She eventually chooses Tupe, but Fort remains her best friend. Chloe's priority is to ensure her family remains intact and her father's happiness is more important than her own mother's. She is happy about Andrea's relationship with her father, and she is instrumental in Lucas' change of heart for Andrea. She struggles with her father's disciplinary actions regarding her relationship with Tupe. Andrea successfully bridges this challenge. Chloe also sees through her mother's antics towards Andrea. She asks her mother to back off. Grace's obsession remains a big concern for the children, and Chloe has taken it upon herself to communicate their dismay to their mother. They love and respect their mother, but they are very clear they value the importance of Andrea in their lives. They love their stepmother very much and want to make sure their mother does not destroy the family they had built with her.
Ronnie Alonte as Christopher "Tupe" Dimayuga. Chloe's boyfriend. He is a brilliant scholar, who interned at Anton's company, and earned the respect of his colleagues and teachers. Unfortunately, his lack of maturity to handle first love and its responsibilities, has driven him into situations that made him lose his scholarship and employment. Chloe loves him deeply, tries hard to understand him, and struggles to preserve their relationship, even if she was forbidden by her father to embark into a boyfriend relationship with him. Unfortunately, their disobedience has caused various conflicts and heartaches for both. As Tupe drives the relationship towards a downward spiral because of his immature decisions, Chloe is understanding now what it takes to keep a relationship. She is opening her eyes to the large maturity gap that exists in her relationship with Tupe. After seeing the experience of her mom and dads failed marriage, and the separation of her dad and step mom, she broke up with Tupe.
Enchong Dee as Andrew Agoncillo, Andrea's para-triathlete half-brother who tries his best to fit in with Andrea's family. He works in Andrea's event management firm, and falls in love with their client, Bianca Silverio, Grace's niece and gets her pregnant. Despite the insults and objections hurled at Andrew by the wealthy Silverios, the young couple are determined to prove their love. Andrew and Bianca have the full emotional support from his family. Their marriage thrives and they have a young boy.
JK Labajo as Lucas S. Noble. Anton and Grace's only son who disliked Andrea in the beginning and dreamt of making his family complete again. He learns to respect and love Andrea, who made sure she and Anton would not get married until Lucas accepted their relationship. He is the child who was most sensitive to Andrea's feelings during the first months of their marriage, particularly when Grace tried to ruin it in many ways possible. He loved his mother but understood that Andrea completed his father's happiness. He wanted his mother to move on. He was also very disappointed and disillusioned with Grace after he learned she had a boyfriend after his parents' separation. He remained Andrea's strong supporter to the end.
Hannah Lopez Vito as Katherine "Kitty" S. Noble. Anton and Grace's youngest child who is supportive of her father's relationship with Andrea. She genuinely loved Andrea as she would love her own mother. She showed this when she used a family portrait with Andrea as her "treasure" at a family camp activity. Kitty also loves her mother, but she has accepted that her mother left her once, for reasons she can't fully understand, and could very well leave her again. She is very much affected by Andrea and Anton's quarrels caused by her mother's obsession. She asked her siblings to help her do something to fix it. She is terrified that Andrea would leave their home like their real mother did.
Tirso Cruz III as Antonio "Tony" Noble III, Anton's father who became a renowned scientist from poor roots. He had little faith in his son's decisions and initially did not support Anton's relationship with Andrea. He changed his mind after Andrea won him over, and he saw how happy his son was.
Irma Adlawan as Virginia "Baby" Custodio-Agoncillo, Andrea's mother and Andrew's stepmother who is supportive in all of Andrea's decisions, especially with Anton. She dispenses very good advice to Andrea, always bringing her out of sadness when dealing with her marriage problems.
Perla Bautista as Carla "Mameng" Agoncillo, Andrea's grandmother and the matriarch of the Agoncillo family. In the beginning, she did not approve of Andrea's relationship with Anton, until he proved her wrong. Despite her initial misgivings and ongoing concerns over her granddaughter's issues in her marriage, she remains supportive of Andrea and Anton. She is equally supportive of Andrew and Bianca, despite their situation.
Bernard Palanca as Tom Gonzales, Anton's best friend who secretly likes Andrea's best friend, Tracy. He is supportive to Anton's relationship with Andrea. He is ready to ask Tracy to marry him.
Matet de Leon as Engr. Tracy Buenaventura, Andrea's best friend who likes Anton's best friend, Tom. She was with Andrea in Germany when they went to the CELBA conference. She is a bit too much in her support of Andrea, too nosy, but she means well.
Jameson Blake as Andres Bonifacio "Fort" Gonzales. Chloe's childhood best friend who pretends to be her boyfriend to help Chloe get the attention of Tupe. His parents suffer from a broken marriage and he relies on Chloe to be the person to talk to. He is in love with Chloe. He is much more mature than Tupe.
Melanie Marquez as Miriam "Mimi" Stuart, Andrea's business partner in Good Events.
Arlene Muhlach as Noemi Agoncillo, Andrea's aunt (her late father's sister) who was against Andrea and Anton's relationship in their early stages of courtship.
Anna Marin as Cecilia Hernandez-Noble, Anton's loving mother and the grandmother to Chloe, Lucas, and Kitty. Unlike Tony, she fully trusts and supports Anton's relationship with Andrea. She's never seen Anton so happy.
Jenine Desiderio as Bettina "Betty" Agoncillo, Andrea's aunt (her late father's sister) who was the godmother at her wedding.
Denise Joaquin as Maggie Agoncillo, Andrea's cousin.
Claire Ruiz as Gena, Tupe's ex-girlfriend who is jealous of Chloe, and a trouble maker.
Pamu Pamorada as Maxine, Andrea's friend who works with her in Good Events.
Prince Stefan as Oscar, Andrea's friend who works with her in Good Events.
Sam Thurman as Marcus, Andrea's friend who works with her in good events.
Kazel Kinouchi as Bianca Silverio, Grace's niece who is living with her due to business reasons. She falls in love with Andrew and ends up pregnant.
Patricia Ysmael as Astrid, Anton's loyal secretary.
Troy Montero as Michael, Grace's ex-boyfriend who is persistent in getting back together with her. He is whom the family is suspecting the reason why Grace left them. He confronted Lucas, introducing himself as Grace's boyfriend.
Carla Martinez as Dianne Silverio, Grace's mother and the maternal grandmother to Chloe, Lucas, and Kitty. She returns to the Philippines and helps Grace in her battle with Andrea and Anton because she thought Grace wanted to get her children back. When she realized her daughter's real agenda, she tries to put a stop to Grace's plans.
Lilet as Amina Gonzales, Fort's mother who strives to keep her family together despite her husband's persistent affairs. She forgave her husband when he returned.
Michael Flores as Marlon Gonzales, Fort's father who left them for his mistress. He realized his error and returned to his original family,
Cris Villanueva as Paul Silverio, Bianca's father who disapproves her daughter's relationship with Andrew. He is Grace's brother and equally selfish and greedy.
Lui Manansala as Yaya Diding, a long time retainer of the Silverio who served as nanny and major doma in Anton's house who keeps Grace updated with news on Anton and Andrea's relationship. She hates Andrea for Anton and thinks that she is only after his money. She tries to undermine Andrea until she overstepped her boundaries and was fired by Anton. She ended up returning to Grace.
Kim Molina as Anjanette, Andrea's friend who is directing Lucas's music video launch.
Minnie Aguilar as Lota
Kyra Custodio as Lucy
Ethyl Osorio as Francia
Trina "Hopia" Legaspi as Kath, Chloe's friend.
Josh Ivan Morales as Berto
Miguel Diokno as Santino Agoncillo, Andrea's nephew who is scared that Kitty might replace him as her baby.
Lance Lucido as Marty
Aaliyah Belmoro
Makisig Morales as Donald
Eric Nicolas as Gaston Dimayuga
Marc Santiago as Donald Dimayuga
Via Veloso as Susan
Richard Manabat as Boyet Agoncillo
Dwight Gaston as Jordan
Via Carillo as Morgana Agoncillo
Uajo Manarang as Vincent Agoncillo
Jade Ecleo as Catherine Agoncillo
Marianne Guidiotti as Karen Noble
Erika Padilla as Melissa
Riva Quenery as Coleen
Luke Jickain as Mr. Salcedo
Krystal Mejes as Crystal
Scott Tibayan as Fred
Special participation
Xian Lim as Sebastian "Totoy" Cruz, Andrea's childhood friend who is in love with her. He later gives way to Andrea and Anton's love knowing that it would make Andrea happy, and he went abroad as a seaman.
Daniel Matsunaga as Patrick Buendia, Andrea's client, who appears to be interested in Andrea.
Andrea Brillantes as young Andrea "Andeng" Agoncillo, the daughter of Baby and Reynaldo who believes that she does not need her father because he left them.
Pilar Pilapil as Mrs. Victoria Madrigal, a client of Andrea's company, Good Events, who introduced her to Anton.
Victor Silayan as Jerold Francisco, Andrea's former fiancé who she caught cheating on her with another woman.
TJ Trinidad as Ben
Toby Alejar as Reynaldo Agoncillo, Andrea and Andrew's father as well as Baby's husband. He had an affair with another woman and abandoned his first family, only to return after he suffered a stroke and his mistress refused to care for him.
Bobby Andrews as Bobby Andrews, a fellow business associate of Anton.
Bea Rose Santiago as Herself
Wendy Cornejo as Himself
Episodes
Reception
Production
Title change
The initial title for the series was The Second Wife. However, the Wife titles became redundant, and thus the title was later renamed by the management as A Love to Last.
Timeslot change
On January 23, 2017, A Love to Last was moved to a later timeslot at 9:30pm after the 2016 series of Till I Met You ended to give way for My Dear Heart.
International broadcast
Aired Internationally via Netflix
See also
List of programs broadcast by ABS-CBN
List of drama series of ABS-CBN
References
External links
ABS-CBN drama series
2017 Philippine television series debuts
2017 Philippine television series endings
Philippine romantic comedy television series
Philippine romance television series
Television series by Star Creatives
Television shows filmed in Germany
Television shows filmed in the Philippines
Filipino-language television shows |
The subfamily Tylomyinae consists of several species of New World rats and mice including the vesper and climbing rats. They are not as well known as their relatives in the subfamilies Sigmodontinae and Neotominae. Many authorities place all three of these subfamilies in a single subfamily, Sigmodontinae.
List of Species
SUBFAMILY TYLOMYINAE
Tribe Nyctomyini
Genus Otonyctomys
Hatt's vesper rat, Otonyctomys hatti
Genus Nyctomys
Sumichrast's vesper rat, Nyctomys sumichrasti
Tribe Tylomyini
Genus Tylomys
Chiapan climbing rat, Tylomys bullaris
Fulvous-bellied climbing rat, Tylomys fulviventer
Mira climbing rat, Tylomys mirae
Peters's climbing rat, Tylomys nudicaudus
Panamanian climbing rat, Tylomys panamensis
Tumbala climbing rat, Tylomys tumbalensis
Watson's climbing rat, Tylomys watsoni
Genus Ototylomys
Big-eared climbing rat, Ototylomys phyllotis
La Pera big-eared climbing rat, Ototylomys chiapensis
See also
New World rats and mice
References
Steppan, S. J., R. A. Adkins, and J. Anderson. 2004. Phylogeny and divergence date estimates of rapid radiations in muroid rodents based on multiple nuclear genes. Systematic Biology, 53:533-553.
Cricetidae
Mammal subfamilies
Taxa named by Osvaldo Reig |
Americans for Technology Leadership is a coalition of technology professionals, companies and organizations that advocates limited government regulation of technology. It has been described as a Microsoft front organization and has been cited as an example of astroturfing.
In 2001, the Los Angeles Times reported that hundreds of similar letters were sent to newspapers voicing disagreement with the United States Department of Justice and its antitrust suit against Microsoft. The letters, prepared by Americans for Technology Leadership and Citizens Against Government Waste, had in some cases been mailed from deceased citizens or nonexistent addresses.
The founding members of the coalition are:
Association for Competitive Technology
Citizens Against Government Waste
Cityscape Filmworks
Clarity Consulting
CompTIA
CompUSA
Microsoft Corporation
60Plus Association
Small Business Survival Committee
Staples, Inc.
References
External links
official website
Political advocacy groups in the United States |
Lolita Cuevas (1910–1994) was a Puerto Rican-born singer and actress. Her work as a vocalist was based on a compendium of Caribbean songs, and her interpretations of them are considered a fundamental piece in the historiography of Haitian music.
Biography
Lolita Cuevas was born in Mayagüez, Puerto Rico in 1910. Her family moved to Haiti when she was two, where she then spent her childhood.
At the age of fifteen she gave her first concert as a professional singer in Port-au-Prince. From there her career took off, and she frequently sang for the radio and concerts around the Caribbean, Latin America, and the United States.
In 1941 her interpretation of La Borinqueña became popular in Puerto Rico, and she recorded versions of "In My Old San Juan" in French and Creole.
In 1953 she recorded the album "Haitian Folk Songs" with guitarist and arranger Frantz Casseus.
She died in 1994.
External links
"Mujeres pioneras puertorriqueñas" Consultado el 6 de abril de 2010
notas contenidas en el álbum "Haitian folk songs" del Smithsonian Institution Consultado el 6 de abril de 2010
1910 births
1994 deaths
Musicians from Mayagüez, Puerto Rico
Actors from Mayagüez, Puerto Rico
Puerto Rican emigrants
Spanish-language singers
20th-century Haitian women singers
Haitian people of Puerto Rican descent |
Mae Peshlakai is an American politician and a Navajo elder, jewelry maker, and weaver. She is a Democratic member of the Arizona House of Representatives elected to represent District 6 in 2022.
She is the mother of former State Senator Jamescita Peshlakai. She speaks English and Navajo.
References
External links
Biography at Ballotpedia
Democratic Party members of the Arizona House of Representatives
Living people
Year of birth missing (living people)
21st-century American women politicians
Women state legislators in Arizona
21st-century American politicians
Navajo leaders
Native American state legislators in Arizona
Native American women in politics
Native American jewelers
21st-century American jewellers
American weavers
Native American textile artists
People from Coconino County, Arizona
Textile artists from Arizona |
The horizon is the line at which the sky and the Earth's surface appear to meet.
Horizon or The Horizon may also refer to:
Art, entertainment, and media
Films
Horizon (1932 film), a Soviet film
The Horizon (film), a 1961 Soviet film
Horizon (1971 film), a Hungarian film
The Horizon (地平線), a 1984 Japanese film by director Kaneto Shindo
Horizon (1989 film), an Iranian film
Horizon (2018 film), a Georgian film
Horizon: An American Saga, an American epic Western
Games
Horizon (video game series), a series of action role-playing games developed by Guerrilla Games
Horizon Zero Dawn, a 2017 video game for the PlayStation 4 and Microsoft Windows
Horizon Forbidden West, a 2022 sequel for PlayStation 4 and PlayStation 5
Horizons: Empire of Istaria, the original name of the MMORPG Istaria: Chronicles of the Gifted
Forza Horizon, a 2012 open world racing game for Xbox 360, which became a sub-series for the Forza racing game franchise
Animal Crossing: New Horizons, a 2020 video game for the Nintendo Switch
Horizon, a playable character in the game Apex Legends
Music
Horizons Gorwelion, an annual festival aimed at promoting independent contemporary new music in Wales
Horizon (band), a German metal band
Horizon (Filipino band), a South Korea-based Filipino boy band
Horizon Records, an American record label
Albums
Horizon (Culture Beat album), 1991
Horizon (Eddie Rabbitt album), 1980
Horizon (Remioromen album), 2006
Horizon (Sun Ra album), 1972
Horizon (The Carpenters album), 1975
Horizon (McCoy Tyner album), 1979
Horizon, album by BZN
Horizons (Kris Allen album), 2014
Horizons (Charles McPherson album), 1968
Horizons (Parkway Drive album), 2007
Horizons (Ira Sullivan album), 1987
Horizons (Starset album), 2021
Horizon (The Rocking Horse Winner album), 2002
Songs
"Horizon" (Jessica Andersson song), Melodifestivalen 2021 entry
"Horizon", a 2008 single by D'espairsRay
"Horizon", a song by The Bats from the album At the National Grid
"Horizon", a song by Diaura from the album Triangle
"Horizon" (Daft Punk song), on the 2013 album Random Access Memories
"Horizons" (Genesis song), a song by Genesis on the 1972 album Foxtrot
"Horizons", a 1994 song by British DJ and drum and bass musician LTJ Bukem
"Horizon", a song by American musician Cat Power from the 2018 album Wanderer
"Horizons", a song by the 3rd and the Mortal from the 1996 album Painting on Glass
"Horizon", a song by Akina Hakamori from the 1984 album Possibility
"Horizon", a comedy song about the Chrysler Horizon by The Arrogant Worms from their 1995 album C'est Cheese
"Horizon" (Jaehyun song), a 2023 single by South Korean singer and NCT member Jaehyun
Periodicals
Horizon (magazine), British magazine, 1940–1949, founded by Cyril Connolly, Stephen Spender and Peter Watson
Horizon (online magazine), research and innovation magazine published by the European Commission
Horizon (U.S. magazine), 1958–1989, originally published by American Heritage
Horizon Weekly, Armenian-Canadian newspaper publication
Horizons (magazine), research magazine of the Swiss National Science Foundation and the Swiss Academies of Arts and Sciences
Horizons: The Journal of the College Theology Society, a religious study journal
The Horizon: A Journal of the Color Line, U.S. magazine, 1907–1919, edited by W.E.B. Du Bois
Television and web series
Horizon (British TV series), a long-running British programme on BBC television showing popular science documentaries
Horizon (Canadian TV program), a 1963–1964 Canadian current affairs television program that aired on CBC
Arizona Horizon, a current events television program that debuted Arizona-based KAET in 1981
The Horizon (web series), a web series which premiered on YouTube; it is the most watched online series made in Australia and the most watched gay web series in the world.
"Horizon" (Star Trek: Enterprise), a 2003 second-season episode of Star Trek: Enterprise
"The Horizon" (Alias), a 2005 episode
Pokémon Horizons: the Series, the 26th season of the Pokémon anime series
Other arts, entertainment, and media
Horizon (novel), a 2009 fantasy novel by Lois McMaster Bujold
Horizontes (Horizons), 1913 painting by Francisco Antonio Cano Cardona
Horizons (ballet), a modern dance work
Horizons, a sculpture by Neil Dawson
Companies and brands
Horizon (camera), a swing-lens panoramic camera manufactured in Russia
Horizon Fitness, a fitness equipment subsidiary of Johnson Health Tech
Horizon Fuel Cell Technologies, a corporation specializing in fuel cell technology
Horizon Nuclear Power, a British energy company
Horizon Organic, an American company that produces dairy and egg products
Horizon Pipeline, a small natural gas pipeline that moves gas in northern Illinois
Horizon Power, a corporation owned by the Government of Western Australia
Planning horizon, the amount of time an organisation will look into the future when preparing a strategic plan
Horizons Satellite, a joint venture between Intelsat and SKY Perfect JSAT Group that owns a fleet of Horizons satellites
Horizon (store), a discount department store
Warner Horizon Television, Warner Bros Television’s division formed in 2006
Horizon Therapeutics, a biopharmaceutical company
Radio and television providers
Horizont (radio station), or Horizon Radio, a state-owned Bulgarian Radio Station
Heart 103.3, or Horizon Radio (UK), a UK radio station
Horizon TV Asia, a television provider in India
Events and organizations
Horizon League, a collegiate athletic conference in the midwestern USA
Horizons Regional Council, the regional authority for the Manawatu-Wanganui region of New Zealand
Horizon 2020, a funding programme by the European Union for innovation and economic growth
Horizon Europe, continuation of Horizon 2020
Horizons (political party), French center-right political party
Orizzonti (Horizons), a parallel section of the Venice Film Festival
Places
Horizons Region, official name of Manawatū-Whanganui region in New Zealand
Horizon, Saskatchewan, hamlet in Saskatchewan, Canada
Rosemont Horizon, the former name of Allstate Arena, a multipurpose arena in Rosemont, Illinois, United States
Horizon City, a town in Texas, United States
Horizons (Epcot), a former Epcot Center attraction at Walt Disney World
Schools
École secondaire l'Horizon, a French public secondary school in Quebec, Canada
Horizon High School (disambiguation)
Horizon Science Academy, a group of charter schools which is owned by Concept Schools in Ohio, United States
Science
Computers and computer science
Horizon effect, in artificial intelligence: the computational limit beyond which conventional game-tree search algorithms make suboptimal decisions
Horizons: Software Starter Pack, a 1982 software compilation for the ZX Spectrum
North Star Horizon, an 8-bit computer system based on the ZiLOG Z80A microprocessor
Split horizon route advertisement, one of the methods in computer networks used to prevent routing loops
VMware Horizon, a commercial desktop-virtualisation product released in 2014 (formerly called Horizon View)
Nintendo Switch system software, internally known as Horizon
Horizon, a social platform being built by Meta Platforms, encompassing Horizon Home, Horizon Worlds, Horizon Workrooms, Horizon Venues and Horizon Marketplace
Horizon, computer accounting system used in connection with the British Post Office scandal
Geology, soil science and archeology
Horizon (archaeology), a distinctive sediment, artefact, style or other cultural trait that is found at archaeological sites across a large geographical area
Horizon (geology), a bedding plane or a thin bed of distinctive character within a stratigraphic sequence
Marker horizon, a distinctive stratigraphic unit, of the same age across several locations
Soil horizon, a specific and distinctive layer in a land area
Physics
Horizon (general relativity), that play a role in Einstein's theory of general relativity
Absolute horizon, a boundary in spacetime in general relativity inside of which events cannot affect an external observer
Apparent horizon, a surface defined in general relativity
Cauchy horizon, a surface found in the study of Cauchy problems
Celestial horizon, a great circle parallel to the horizon
Cosmological horizon, a limit of observability: the maximum distance from which particles can have travelled to an observer in the age of the universe
Event horizon, a boundary in spacetime beyond which events cannot affect the observer
JPL Horizons On-Line Ephemeris System, an interactive facility that computes the position of many solar system objects
Killing horizon, a null surface on which there is a Killing vector field
Radio horizon, the locus of points in telecommunication at which direct rays from an antenna are tangential to the surface of the Earth
Transportation
Horizon (railcar), an Amtrak passenger car used mostly in the Midwest
Attitude indicator, or Artificial horizon, an instrument used in an aircraft to inform the pilot of the orientation of the airplane relative to the ground
, a cruise ship operated by Carnival Cruise Line
Chrysler Horizon, a car designed by Chrysler Europe
Fisher Horizon, a kit aircraft
Hawker Horizon, the original name of the Hawker 4000 business jet
Halman Horizon, a Canadian sailboat design
Horizon Air, a regional airline and subsidiary of the Alaska Air Group
Horizon Airlines (Australia), an Australian airline based in Sydney
Horizon-class frigate, a multi-national collaboration to produce a new generation of anti-air warfare frigates
, a cruise ship operated by Pullmantur Cruises
Other uses
Fusion of horizons, understanding that results from the dynamic process of integrating the 'Other' and the familiar
Project Horizon, a study to determine the feasibility of the construction of a military base on the moon conducted in 1959
See also
Bring Me the Horizon, a British rock band
"Over the Rainbow", a song written for the movie The Wizard of Oz
Mirage, a naturally occurring optical phenomenon in which light rays bend to produce a displaced image of distant objects
New Horizons (disambiguation)
New Horizon (disambiguation) |
Silas Canyon is a canyon in the Wind River mountain range near Lander, Wyoming in the United States.
The canyon is a long glacial-carved trough with numerous lakes, which makes it a popular destination for
backpackers and fishermen. The Thumb Lake sits at its head.
Plant life
Silas Canyon and the surrounding area is home the various plant species common in the Southern Wind River Mountains. Whitebark pine and Lodgepole pine are the predominant tree species.
References
Canyons and gorges of Wyoming
Landforms of Fremont County, Wyoming |
Great Needle Peak (, ; variant name in ) is the summit of the central Levski Ridge in Tangra Mountains on Livingston Island, Antarctica. Rising to 1,679.5 m, it is the third highest peak of both the mountains and the island after Mount Friesland (1700.2 m) and St. Boris Peak (1685 m). Great Needle Peak surmounts Huron Glacier and its tributary draining Devnya Valley to the north, Magura Glacier to the east, Srebarna Glacier to the south, and Macy Glacier to the southwest.
History
The peak's name derives from the Spanish name form pico Falsa Aguja (False Needle Peak) that probably dates back to 1957, with ‘great’ becoming established in usage and considered more suitable than ‘false’ as this heavily glaciated, major peak could hardly be associated with the ‘true’ Needle Peak (pico Aguja), a sharp rocky peak of elevation just 370 m situated near Samuel Point 8 km away.
The first ascent and GPS survey of Great Needle Peak was made on 8 January 2015 by the Bulgarian mountaineers Doychin Boyanov, Nikolay Petkov and Aleksander Shopov from Camp Academia locality (541 m) via Lozen Saddle (437 m) and Plana Peak (740 m). Their measured peak elevation of 1,679.5 m) updated the previously existing estimate (1,690 m according to the Bulgarian topographic survey Tangra 2004/05), and confirmed that the summit of both the mountains and the island is indeed the 1700.2 m high Mount Friesland.
Location
The peak is located 6.7 km east of Mount Friesland, 3.32 km east by south of Levski Peak, 2.21 km south-southeast of Plana Peak, 2.54 km south of Sitalk Peak and 1.84 km south of Tutrakan Peak, 2.15 km southwest of Helmet Peak, 3.32 km northwest of M'Kean Point, 1.29 km north of Serdica Peak, and 470 m southeast of Sofia Peak (1655 m) with which it forms a twin peak.
Maps
Chart of South Shetland including Coronation Island, &c. from the exploration of the sloop Dove in the years 1821 and 1822 by George Powell Commander of the same. Scale ca. 1:200000. London: Laurie, 1822
South Shetland Islands. Scale 1:200000 topographic map. DOS 610 Sheet W 62 60. Tolworth, UK, 1968.
Islas Livingston y Decepción. Mapa topográfico a escala 1:100000. Madrid: Servicio Geográfico del Ejército, 1991.
S. Soccol, D. Gildea and J. Bath. Livingston Island, Antarctica. Scale 1:100000 satellite map. The Omega Foundation, USA, 2004.
L.L. Ivanov et al., Antarctica: Livingston Island and Greenwich Island, South Shetland Islands (from English Strait to Morton Strait, with illustrations and ice-cover distribution), 1:100000 scale topographic map, Antarctic Place-names Commission of Bulgaria, Sofia, 2005
L.L. Ivanov. Antarctica: Livingston Island and Greenwich, Robert, Snow and Smith Islands. Scale 1:120000 topographic map. Troyan: Manfred Wörner Foundation, 2010. (First edition 2009. )
Antarctic Digital Database (ADD). Scale 1:250000 topographic map of Antarctica. Scientific Committee on Antarctic Research (SCAR). Since 1993, regularly upgraded and updated.
L.L. Ivanov. Antarctica: Livingston Island and Smith Island. Scale 1:100000 topographic map. Manfred Wörner Foundation, 2017.
A. Kamburov and L. Ivanov. Bowles Ridge and Central Tangra Mountains: Livingston Island, Antarctica. Scale 1:25000 map. Sofia: Manfred Wörner Foundation, 2023.
See also
Tangra Mountains
Livingston Island
South Shetland Islands
Antarctica
Gallery
Notes
References
Bulgarian Antarctic Gazetteer. Antarctic Place-names Commission. (in Bulgarian; cf. the "Levski Ridge" entry)
Pico Falsa Aguja. SCAR Composite Antarctic Gazetteer.
External links
Great Needle Peak. Copernix satellite image
Tangra Mountains
Mountains of Antarctica |
Dennis David Coles (born May 9, 1970), better known by his stage name Ghostface Killah, is an American rapper and a member of the hip hop group Wu-Tang Clan. After the group achieved breakthrough success in the aftermath of Enter the Wu-Tang (36 Chambers), the members went on to pursue solo careers to varying levels of success. Ghostface Killah debuted his solo career with Ironman, which was well-received by music critics, in 1996. He has enjoyed continued success in the years that have followed, releasing critically acclaimed albums such as Supreme Clientele (2000) and Fishscale (2006). His stage name was taken from one of the characters in the 1979 kung fu film The Mystery of Chess Boxing. He is the founder of his own record label, Starks Enterprises.
Ghostface Killah is critically acclaimed for his loud, fast-paced flow, and his emotional stream-of-consciousness narratives containing cryptic slang and non-sequiturs. In 2006, MTV included him as an "honourable mention" on their list of the "Greatest MCs of All Time", while the editors of About.com placed him on their list of the "Top 50 MCs of Our Time (1987–2007)", calling him "one of the most imaginative storytellers of our time." Q magazine called him "rap's finest storyteller." Pitchfork Media has stated that "Ghostface has unparalleled storytelling instincts; he might be the best, most colorful storyteller rap has ever seen." NPR has called him "a compulsive storyteller", and asserts that "his fiction is painterly."
Early life
Ghostface grew up in the Stapleton Houses housing project in Staten Island, New York City, helping with daily care of two younger brothers who had muscular dystrophy. The 2019 series Wu-Tang: An American Saga depicts a feud between him and fellow Clan member Raekwon; however the feud was purely fictional and never took place in reality. Raekwon and Ghostface attended junior high school together.
Career
Early work
A roommate of Wu-Tang founder RZA, Ghostface helped bring together the other seven members. In 1995, Ghostface guest-starred extensively on fellow Clan member Raekwon's debut album, Only Built 4 Cuban Linx..., appearing on almost every song and receiving nearly equal billing. "It felt good to have my boy next to me, Ghostface, who basically comes from the same lifestyle as I come from. And we were able to sit down and concoct an idea that we both were able to respect and basically get everybody in the crew involved...", said Raekwon about Ghostface's involvement in the project. Raekwon intended Only Built 4 Cuban Linx... to play like a film, with himself as the "star," Ghostface Killah as the "guest star" and producer RZA as the "director." He also contributed songs to the Sunset Park and Don't Be a Menace to South Central While Drinking Your Juice in the Hood soundtracks; both songs were included on his first solo LP, Ironman, in 1996. The album, which debuted at #2 on the Billboard 200, had a more pronounced soul influence (particularly 1970s soul) than previous Wu-Tang releases, and Ghostface's future albums would continue to feature this stylistic trait.
In the year 2000, Ghostface released his second studio album, Supreme Clientele. The album was well received by critics, and peaked at #7 on the Billboard 200|Billboard 200. It included "Apollo Kids", a popular single which featured Raekwon and had a sample of "Cool Breeze" by Solomon Burke. "Cherchez La Ghost", another single off the album, became a minor club hit. Supreme Clientele marked a turning point in terms of RZA's influence on Ghostface's sound, as only six songs on it are produced by RZA, whereas on Ironman, its predecessor, every song but one is produced by RZA. Although he contributed fewer beats to the project than to Ironman, RZA personally oversaw the mixing and production of the album as a whole, thereby contributing to Supreme Clienteles unified sound.
Ghostface wasted little time in recording his next album, the heavily R&B-influenced Bulletproof Wallets, released a year after Supreme Clientele. Its main single, "Never Be the Same Again", featured Raekwon and Carl Thomas. It produced another minor club hit, "Flowers", which featured guest vocals from fellow Wu-Tang members Method Man and Raekwon, and a popular single, "Ghost Showers" which featured Madame Majestic, whose other key claim to fame is that she sings on the popular Wu-Tang track "Gravel Pit".
Def Jam
In 2003, Ghostface signed with Def Jam Records. After temporarily dropping "Killah" from his stage name, Ghostface released The Pretty Toney Album in April 2004. The album, while containing two RZA productions, featured none of the Clan; instead, it featured collaborations with Missy Elliott, D-Block, and Jacki-O. The singles "Tush" and "Run", which were collaborations with Missy and Jadakiss respectively, achieved moderate success in the clubs and on the charts, and the album was featured on numerous "best of the year" lists; for instance, it was Pitchfork Media's #9 album of the year. Ghostface also appeared on the track "On My Knees" by UK R&B group the 411; the song became a hit in the UK and Australia. Ghostface then released an album entitled 718 (after the Staten Island area code) with a group of his protégés, the Theodore Unit. Ghostface also appeared on "He Comes" by De La Soul, on The Grind Date. In November 2005, Ghostface and Theodore Unit's breakout star Trife Da God released a joint project, Put It on the Line.
In 2006, Ghostface teamed up with underground artist MF Doom for a still-unreleased album entitled Swift & Changeable. MF Doom also produced several songs for Ghostface's 2006 album Fishscale, on which he chose to revert to the stage name "Ghostface Killah", rather than just "Ghostface". The album debuted strongly, appearing at the #4 position on the U.S. Billboard 200 and at #2 on the R&B charts, the rapper's most auspicious chart showing since the heyday of the Wu-Tang Clan and the release of his solo debut. The album also received near-unanimous positive reviews. Ghostface embarked on a limited-date tour of U.S. venues in support of the album, performing several of his concerts together with most of the other members of the Wu-Tang Clan.
In 2007, Ghostface provided the theme song for the Irish animated series Skunk Fu! that ran on Kids' WB. On December 4, 2007, Ghostface released his seventh solo studio album, The Big Doe Rehab.
In a May 2008 interview, Ghostface Killah stated that he would make an R&B-inspired album in the vein of certain tracks he had done before with artists such as Ne-Yo and Jodeci. That album would become his eighth studio album, Ghostdini: Wizard of Poetry in Emerald City, which won good reviews from music critics. It featured singles such as "Baby" and "Do Over". In March 2009, Ghostface responded to the Rihanna/Chris Brown controversy by recording a song, "Message from Ghostface", which was dedicated to women in abusive relationships.
In a May 2009 interview with Rolling Stone, Raekwon indicated that Ghostface Killah was preparing to release a new album. In response to a question asking if the Wu-Tang Clan were going to release a follow-up to 8 Diagrams, Raekwon stated, "Everybody's doing different things right now — you got Meth [Method Man] coming out with an album, you got Ghostface coming out with an album, some guys working on their projects, some guys getting into the film world, everybody is multi-tasking right now." Ghostface appeared on a total of 8 songs on Raekwon's highly anticipated release of Only Built 4 Cuban Linx... Pt. II.
Shortly after the release of Only Built 4 Cuban Linx... Pt. II, Def Jam contracted Raekwon to work with their label artists Method Man and Ghostface Killah on an album which later received the title Wu-Massacre. Production began in November 2009. Wu-Massacre was released March 30, 2010 to generally positive reviews from music critics; this time, however, reviews were more mixed, with some critics objecting to the 30-minute-long album's rushed feel. With heavy promotion, it sold 37,900 units in its first week; it has sold 64,000 units as of May 12, 2010. It features production from Scram Jones, Mathematics, and The RZA, who produced the album's lead single, "Our Dreams".
In 2010, Ghostface confirmed that he would be releasing two new studio albums, Apollo Kids and one which would serve as a sequel to his 2000 album Supreme Clientele. In 2011, Ghostface Killah featured on UK artist Josh Osho's debut single "Redemption Days".
Post Def Jam
Ghostface released a collaborative album with D-Block member Sheek Louch called Wu Block. The album was released on November 27, 2012, on E1 Music and debuted at number 73 on the US Billboard 200 chart, with first-week sales of 8,600 copies in the United States. It fell to #152 in its second week selling 4,200 more copies. In January of 2017, Ghostface and Sheek Louch announced on their respective social media accounts that a second collaborative album was in the works.
In an interview with Complex Magazine on November 17, 2012, Ghostface confirmed that he had left Def Jam, making Apollo Kids his last album on the label. In the same interview, he also stated that Blue & Cream, the sequel to his critically acclaimed album Supreme Clientele, was 80-85 percent done. On April 16, 2013, Ghostface released his tenth album Twelve Reasons to Die which was produced by Adrian Younge and executive produced by RZA. The album was released in various formats such as CD, vinyl and cassette under RZA's Soul Temple Records. The deluxe digital and CD versions also came with a comic book.
He would later announce that the sequel to Supreme Clientele would be released between July and September 2013 and that his collaborative album with MF Doom would be released around Halloween 2013 though neither projects materialized. In January 2014, he appeared on the VH1 series Couples Therapy with his girlfriend Kelsey Nykole. Later that year Ghostface announced he would be releasing his eleventh album titled 36 Seasons in December 2014. He collaborated with Canadian jazz band BADBADNOTGOOD on an album titled Sour Soul, which was released in 2015 which earned a nomination for the 2015 Polaris Music Prize.
A sequel to Twelve Reasons to Die, simply titled Twelve Reasons to Die II, was released on July 10, 2015.
Ghostface had a string of UK and European tour dates scheduled in 2016.
In 2022 he provided vocals on the song "Purple Hearts" from Kendrick Lamar's album Mr. Morale & The Big Steppers.
Lawsuits
In July 2011, Coles was sued by Jack Urbont for copyright violation stemming from the "improper use" of the 1960s "Iron Man" theme song, which Urbont claimed as his own. Urbont also took issue with Coles' appropriation of the Iron Man brand name. Coles was granted summary judgment on the lawsuit in April 2015, which stated that Marvel Entertainment, owners of the Iron Man character and brand, owned the "Iron Man" theme song, not Urbont.
In August 2011, Coles filed a lawsuit against Universal Music for unpaid royalties.
Personal life
Like fellow Wu-Tang Clan member Raekwon, Ghostface is a Muslim, having converted to Islam in 2004. Ghostface is the father of rappers Sun God, Supreme, and singer Infinite.
Aliases
Ghostface Killah, like most members of the Wu-Tang clan, rapped under several personae, each with their own name, mythology and influences. Some recurring aliases:
Ghostface Killah (occasionally spelled Ghostface Killer, Ghost Face Killer, Ghost Face Killah, or abbreviated GFK)
Ghostface (shortened stage name during The Pretty Toney Album era)
Ghost Deini
Ironman, Tony Starks, or just Starks
Ghostface has frequently assumed the names of both Ironman and Tony Starks [sic], a reference to the Marvel Comics character Iron Man and his true identity, billionaire industrialist Tony Stark. He released a 1996 album titled Ironman. His song, "Slept On Tony With Dirt," appears in the 2008 film Iron Man, and he also appears in a deleted scene on the DVD.
Starky Love
Pretty Toney, P Tone
Discography
Studio albums
Ironman (1996)
Supreme Clientele (2000)
Bulletproof Wallets (2001)
The Pretty Toney Album (2004)
Fishscale (2006)
More Fish (2006)
The Big Doe Rehab (2007)
Ghostdini: Wizard of Poetry in Emerald City (2009)
Apollo Kids (2010)
Twelve Reasons to Die (2013)
36 Seasons (2014)
Twelve Reasons to Die II (2015)
Ghostface Killahs (2019)
Collaboration albums
718 (with Theodore Unit) (2004)
Put it on the Line (with Trife Diesel) (2005)
Wu-Massacre (with Method Man and Raekwon) (2010)
Wu Block (with Sheek Louch) (2012)
Sour Soul (with BADBADNOTGOOD) (2015)
The Lost Tapes (with Big Ghost Ltd.) (2018)
Czarface Meets Ghostface (with Czarface) (2019)
Filmography
Movie appearances
Belly (1998) cameo appearance
Black and White (1999) as himself
Hunter Dawson (2002) as himself
Big Wigs (2002) as himself
Fade to Black (2004) as himself
Walk Hard: The Dewey Cox Story (2007) as himself
Iron Man (2008) as himself; also appearing in a music video aired on Tony Stark's private jet. (Cut in post-production, his cameo can be found in the DVD's deleted scenes section.)
Big Pun: The Legacy (2008) as himself
Up and Above (2008) as himself
When in Rome (2010) as Guggenheim DJ
Purple Tape Documentary (2016) as himself
You're Watching Video Music Box (2021) as himself
“The A-Team, episode 22” (1986) as himself
TV series appearances
The World According To Pretty Toney (2005 - 2007) as himself
30 Rock (2006) as himself (episodes "Jack-Tor" and "The Source Awards")
Human Giant (2007) as himself (episodes "Mind Explosion" and "Mosh Pit!")
The Boondocks (2007) as himself (episode "Stinkmeaner Strikes Back")
Rushing Jason (2008) as Big Poppa
Mob Wives (VH1 Series) (2011) as himself
Couples Therapy (2014) as himself
Luke Cage (2018) as himself (episode "All Souled Out")
Video game appearances
Wu-Tang: Shaolin Style (1999) as himself
Def Jam Vendetta (2003) as himself
Def Jam: Fight for NY (2004) as himself
Def Jam Fight for NY: The Takeover (2006) as himself
WWE Smackdown VS. Raw 2007 (2006) Coles had his song “The Champ” on the soundtrack
Def Jam: Icon (2007) as himself
Grand Theft Auto: Chinatown Wars (2009), created the theme music
References
External links
1970 births
African-American male rappers
American male rappers
Def Jam Recordings artists
Epic Records artists
African-American Muslims
Converts to Islam
Tommy Boy Records artists
Living people
Rappers from New York City
Musicians from Staten Island
Wu-Tang Clan members
East Coast hip hop musicians
Hardcore hip hop artists
21st-century American rappers |
The 2008–09 Austrian National League season was contested by eight teams, and saw EHC Lustenau win the championship. All eight teams that participated in the regular season qualified for the playoffs.
Regular season
Playoffs
External links
Season on hockeyarchives.info
Austrian National League
2008–09 in Austrian ice hockey leagues
Austrian National League seasons |
Sainte-Blandine () is a commune in the Isère department in southeastern France.
Population
See also
Communes of the Isère department
References
Communes of Isère
Isère communes articles needing translation from French Wikipedia |
Zawady () is a village in the administrative district of Gmina Pisz, within Pisz County, Warmian-Masurian Voivodeship, in northern Poland.
References
Zawady |
The Banfill Tavern, also known as the Locke House, is a historic building in Fridley, Minnesota, United States. It was built in 1847 on the east bank of the Mississippi River and has served variously as an inn, a logging camp office, a private home, a dairy farm, a post office, and a summer home. It is now owned by Anoka County and, until April 2022, housed the non-profit Banfill-Locke Center for the Arts (now the North Suburban Center for the Arts). The building stands within Manomin County Park, and the art center is a partner site of the Mississippi National River and Recreation Area.
The Banfill Tavern was listed on the National Register of Historic Places in 1976 for its local significance in the theme of architecture. It was nominated for being one of the earliest and best preserved frame Greek Revival houses in Anoka County.
Description
The Banfill Tavern is located on a wooded site near the mouth of Rice Creek. Its floor plan follows an "L" shape. It exhibits Greek Revival style through such architectural features as the six-over-six pane double-hung windows, a tripartite formal entry consisting of a central door with sidelights and a transom, broken-pedimented gables, corner pilasters, and slender brick chimneys.
As of 2017, both the interior and exterior of the home remain essentially unaltered. The interior consists of a large communal room on the first floor that contains an entryway, dining room, living room, kitchen, and service room. Seven interconnected rooms make up the second floor. The entire structure lacks any form of modern central heating. Instead stoves feeding into three chimneys provide warmth.
History
Built in 1847 by John Banfill, the building initially served as an inn and a base for logging operations northwest of Saint Anthony Falls. Due to its proximity to Minnesota's first Territorial Road and the Red River Trails, the inn became a popular rest stop for travelers. John Banfill was elected to the Minnesota State Senate for the 1st Minnesota Legislature in 1848.
An account provided by E. S. Seymour, a visitor to the tavern in 1849, reveals that in its first years of operation the popular stop lacked adequate stable space. Consequently, many travelers' horses and mules remained in the open during the winter of 1848–1849. By the time of Seymour's visit, Banfill had expanded his stall space to accommodate forty horses and mules. Another visitor complimented Banfill on his "good old sparkling Madeira". Travelers filled the Banfill house every night on their way to destinations along the road, including Fort Gaines (renamed Fort Ripley in 1850), the Chippewa Agency, and trading posts, in addition to private homes.
Between 1857 and 1875 it is uncertain who owned the property. In 1876, however, William F. Brown married Laura M. Locke and purchased it. The couple maintained a dairy herd and lived in the house while Brown also worked as postmaster until his death in 1887. His wife and children lived in the house until 1912, when Laura sold it to her brother, Cassius M. Locke.
Locke and his wife Roberta Pratt Locke raised registered Jersey cattle on the farm and used it as a summer home. They made a few additions to the house, including front and rear porches, kitchen and bathroom electrical service, a pump, a water closet, and a sewage disposal system. Most of these improvements took place in the 1930s.
Cassius Locke died in 1947 and Roberta in 1959. The property remained unoccupied until 1967, when Anoka County purchased it. In 1988 an art center founded in 1979 forged a public–private partnership with the county to move into Banfill Tavern after outgrowing its original site. The Banfill-Locke Center for the Arts uses the facility in support of established and developing artists by hosting speakers, classes, and residents in addition to gallery space.
See also
National Register of Historic Places listings in Anoka County, Minnesota
References
External links
Banfill-Locke Center for the Arts
1847 establishments in Wisconsin Territory
Arts centers in Minnesota
Fridley, Minnesota
Greek Revival houses in Minnesota
Hotel buildings on the National Register of Historic Places in Minnesota
Houses completed in 1847
Houses in Anoka County, Minnesota
Houses on the National Register of Historic Places in Minnesota
National Register of Historic Places in Mississippi National River and Recreation Area
National Register of Historic Places in Anoka County, Minnesota
Tourist attractions in Anoka County, Minnesota |
There are a number of significant extant and destroyed gates in North and South Korea. The following list is arranged alphabetically by official English name.
Gates in North and South Korea
See also
List of fortresses in Korea
Korean architecture
References
Korea
Gates in Korea
Gates in North Korea
Gates in South Korea |
The 1973 Wigan Council elections for the First Wigan Metropolitan Borough Council were held on 10 May 1973, with the entirety of the 72 seat council - three seats for each of the 24 wards - up for vote. It was the first council election as the newly formed metropolitan borough under a new constitution. The Local Government Act 1972 stipulated that the elected members were to shadow and eventually take over from the predecessor corporation on 1 April 1974. The order in which the councillors were elected dictated their term serving, with third-place candidates serving two years and up for re-election in 1975, second-placed three years expiring in 1976 and 1st-placed five years until 1978.
Labour won an overwhelming majority of sixty six seats to the Conservative's five and one Independent. Nine seats - for wards 13, 17 and 21 collectively - went unopposed and overall turnout was 34.5%.
Election result
This result had the following consequences for the total number of seats on the Council after the elections:
Ward results
References
1973 English local elections
1973
1970s in Lancashire
1970s in Greater Manchester |
The Machines of the Isle of Nantes () is an artistic, touristic and cultural project based in Nantes, France. The project is based in the old covered buildings of the former shipyards in Nantes that were at one time used for ship construction (les nefs), and later used as business sites.
Exhibits
The Great Elephant (2007) is a mechanical elephant, high and meters wide, made from 45 tons of wood and steel. It can take up to 49 passengers for a 45-minute walk. It is an inexact replica of The Sultan's Elephant from Royal de Luxe, which toured the world from 2005 to 2007; the main difference being that this elephant is designed to carry spectators.
The Marine Worlds Carousel (2012) is a huge carousel, rising nearly 25m high and measuring 20m in diameter. It features 35 moving underwater creatures on three levels: the ocean floor, the depths, and sea and boats. Visitors will be able to move about amidst a ballet of aquatic animals and sea carriages, as well as climb aboard and guide the movements of the Machines.
The Heron Tree is an under-construction steel structure planned to be 50 meters in diameter and 30 meters in height, topped with two herons. The project plans to allow visitors to climb either onto the back or onto the wings of the birds for a circular flight over the hanging gardens of the tree.
The Machine Gallery is an exhibition place to illustrate the background story of the machines. Some visitors are invited to control marine animals or the European Flight Test Center. The entire process of the construction is on display by sketches, models and films.
References
External links
The Machines of the Isle of Nantes – Official website
Nantes Metropole Tourism Office
The Machines de l'Ile YouTube channel
Photographs of the machines and workshop
Slideshow : some pictures of the machines from the Carousel being built (2010)
French art
Nantes
Tourist attractions in Nantes
Squash venues |
Artem Mykhaylovych Sukhotskyi (; born 6 December 1992) is a Ukrainian professional footballer who plays as a defender.
Career
He is a product of the Dynamo Kyiv sportive school. On 12 January 2012 Sukhotskyi signed a contract with Illichivets Mariupol in the Ukrainian Premier League.
Zorya Luhansk
In 2016 he moved to Zorya Luhansk where he manage to play 40 matches scoring one goal and get the third place in Ukrainian Premier League in the season 2016–17.
Slovan Bratislava
In 2018 he moved to Slovan Bratislava where he in the season 2018–19 he won the Slovak Super Liga and in 2020 he won the Slovak Cup.
Dinamo Minsk
In 2020 he moved to Dinamo Minsk where he played 25 match in Belarusian Premier League.
Desna Chernihiv
On 19 February 2021 he moved to Desna Chernihiv, the main club of Chernihiv, becoming the second most expensive player of the club, after Oleksiy Hutsulyak. On 26 February 2021 he made his debut in Ukrainian Premier League, with the new team against Inhulets Petrove at the Valeriy Lobanovskyi Dynamo Stadium ended 3-0 for Desna. On 16 July 2021 with the club decided to don't continue the cooperation and the contract ended.
Chornomorets Odesa
On 23 December 2021, rumors associated him to be closed to sign for Chornomorets Odesa in Ukrainian Premier League, and in January 2022, the rumors were confirmed and the player moved to the club of Odesa. In June 2022 his contract with the club was terminated.
International
In 2007 he was called up to the Ukraine U16, where in two years he managed to play 12 matches. In 2009 he managed to play 3 matches in Ukraine U17. He also played 12 matches and scored 3 goals from 2009 to 2010.
Career statistics
Club
International
Honours
ŠK Slovan Bratislava
Slovak Super Liga (1): 2018–19
Slovak Cup (1): 2020
Oleksandriya
Ukrainian First League (1): 2014–15
Ukrainian First League: Runner-Up 2013–14
Gallery
References
External links
1992 births
Living people
Piddubny Olympic College alumni
Men's association football defenders
Footballers from Nizhyn
Ukrainian men's footballers
Ukrainian expatriate men's footballers
Ukraine men's youth international footballers
FC Dynamo Kyiv players
FC Dynamo-2 Kyiv players
FC Mariupol players
FC Oleksandriya players
FC Zorya Luhansk players
ŠK Slovan Bratislava players
FC Dinamo Minsk players
FC Desna Chernihiv players
FC Chornomorets Odesa players
Slovak First Football League players
Belarusian Premier League players
Ukrainian Premier League players
Ukrainian First League players
Expatriate men's footballers in Slovakia
Expatriate men's footballers in Belarus
Ukrainian expatriate sportspeople in Slovakia
Ukrainian expatriate sportspeople in Belarus |
Eadmuna pulverula is a species of moth of the family Mimallonidae. It is found in Brazil, where it has only been recorded from São Paulo.
The length of the forewings is about 24 mm. The forewings are similar to those of the females of Eadmuna paloa, but with a slightly more pronounced apex and overall darker coloration and heavier speckling due to a higher number of petiolate scales. The hyaline discal mark is smaller. The postmedial line is present, darker, thicker, brown, dentate and narrowly interrupted by veins. There is a dark wedge where the postmedial line meets the costa. The antemedial lines are present, bilobed and B-shaped, but straighter. The hindwings have similar coloration as the forewings, but are lighter overall and the anal angle is accentuated. The postmedial line is dentate, dark, well pronounced, narrowly interrupted by veins and slightly lighter than that of the forewings. There are no hyaline patches.
References
Moths described in 1896
Mimallonidae |
U.S. Highway 10 (US 10) in North Dakota runs from Interstate 94 (I-94)/US 52 near West Fargo east through Fargo before crossing the Red River of the North and entering Moorhead, Minnesota. US 10 serves as a primary east–west corridor through the Fargo–Moorhead (Main Avenue) and is concurrent with I-94 Business for its entire length in North Dakota.
Route description
US 10 begins as a four-lane highway with a median at a trumpet interchange with I-94/US 52 (exit 343) just west of West Fargo. Once entering West Fargo, US 10 passes to the north of Bonanzaville, USA, a history museum complex before entering the downtown area of West Fargo. Continuing east, US 10 enters Fargo at its intersection with 45th Street and then intersects I-29/US 81 (exit 65) at a partial cloverleaf interchange later. East of this interchange, US 10 loses its median but remains two lanes each direction after intersecting 25th Street. After this intersection, US 10 curves slightly southeast and runs along the Northern Transcon railroad tracks, heading into downtown. In downtown Fargo, US 10 passes to the south of the former Fargo station, which is listed on the National Register of Historic Places. At the east end of downtown Fargo, US 10 intersects 2nd Street at a roundabout before crossing over the Red River of the North and into Moorhead, Minnesota, on the Veterans Memorial Bridge.
All of US 10 in North Dakota is part of the National Highway System, a network of highways that are considered essential to the country's economy, defense, and mobility by the Federal Highway Administration.
History
Major intersections
References
External links
10
North Dakota
Transportation in Cass County, North Dakota |
Renata Šmekálová (born 30 March 1969) is a Slovak former professional tennis player.
While competing on the professional tour, Šmekálová had a career high singles ranking of 213 in the world and won two ITF titles. In 1989 she featured in the singles main draw of a WTA Tour tournament in Guarujá.
From 1993 to 1994 she played at collegiate level for Southeastern Louisiana University, amassing a 44–3 record in singles. She was the Southeastern and TAAC Female Athlete of the Year in 1994.
ITF finals
Singles: 3 (2–1)
References
External links
1969 births
Living people
Slovak female tennis players
Czechoslovak female tennis players
College women's tennis players in the United States
Southeastern Louisiana University alumni |
Montigny () is a former commune in the Sarthe department in the region of Pays de la Loire in north-western France. In 2015 it became part of Villeneuve-en-Perseigne. Its population was 27 in 2019.
See also
Communes of the Sarthe department
References
Former communes of Sarthe |
Jorinde Voigt is a German artist, best-known for large-scale drawings that develop complex notation systems derived from music, philosophy, and phenomenology. She is a professor of Conceptual Drawing and Painting at the University of Fine Arts Hamburg. Voigt lives and works in Berlin.
Work
Voigt’s large-scale drawings often emerge from a system of guidelines and rules and therefore her work has drawn comparisons to Minimalist and Conceptual artists, namely the event scores and visual artworks of the 20th-century avant-garde such as John Cage and Iannis Xenakis; the algorithmic patterns of Hanne Darboven; and the procedural parameters of Sol Lewitt. Yet despite these comparisons, Voigt’s work differs markedly from this lineage, particularly because her rigorous systems emerge from how the inner world—such as personal experience, emotion, and memory intersect with external conditions. Voigt has described such a process as providing “instructions for the imagination.”
In 2002, Voigt turned away from the medium of photography and began to make the drawings that she is best known for, which she has alternately described over the years as “projection surfaces, visualized thought models, scientific experimental designs, notations, scores and diagrams. The artist developed her specific symbolic system in the series Notations Florida and Indonesia, both from 2003. According to art historian Astrid Schmidt-Burkhardt, the sixty ink drawings that comprise Notations Florida, “already contain all the registers of perception that would also distinguish her later works.” The resulting drawings convey a series of the artist’s impressions when traveling from Orlando to Miami. As Voigt explains, “I still took stock of situations, but the difference was that I no longer pressed the shutter but rather took notes. In this way, pictures emerged that could no longer be classified as perspectival; rather, they reflected the juxtaposition and the simultaneity of what I experienced.”
Further cycles of work emerged from the perception study developed in this early series. Although formally and conceptually diverse, each of these work cycles shares an interest in making visible that which is “behind” things and capturing the simultaneity of experience through markings on paper.
Views on Chinese erotic art: from 16th to 20th century (2011/2012)
The works from this series combine notation and collage techniques to translate images of historic Chinese erotic paintings and prints into diagrams comprising picture and text elements. Central to this series is a “visual reading” process, which analyzes images as if they were texts. Referencing the Chinese and Japanese painting tradition of capturing a scene in multiple views, Voigt subsumed up to 100 views—each one capturing a specific gaze—onto each sheet of paper, so that the collages resemble scientific tables. To make the works, Voigt cut silhouettes from colored paper that corresponded in color and profile to a particular element of the composition, such as the shape of a woman’s hairdo, a bathtub, or a lover’s embrace. The number of silhouettes were determined by how many times she looked at the detail. Poet and critic John Yau writes, “by unraveling the erotic views into their constituent parts, the artist essentially undresses the encounter, turning it into a collection of visual and written data.” With color choices and notations dictated by the very act of looking itself, the drawings appear as a mental construct with which to investigate human perception, raising questions about language, cognition, intuition, and association.
Piece for Words and Views (2012) Love as passion: On the Codification of Intimacy (2013/2014)
This 36-part series marks a radical shift in Voigt's practice. While earlier works developed notation systems that visually translated the perception of objects or situations, Piece for Words and Views is the first work cycle in which Voigt concretely attempts to find images that correspond to internal processes. With this shift in Voigt’s work, finding forms that correlate to imagination, memory, experience and emotion moved to the forefront of her practice. Piece for Words and Views explores how, when reading, words have the capacity to produce images in the reader’s imagination. The series transforms specific words from A Lover's Discourse by Roland Barthes into both abstract and representational imagery. Each mental image receives a specific color and form, which is rendered via contoured drawing on colored vellum. The final drawing is made by collaging the multiple images, forming an ambiguous relation among them. A similar process is at work in Voigt’s 48-part series Love as Passion: On the Codification of Intimacy, which takes responds to Niklas Luhmann's 1982 book by the same name. Each drawing in Codification of Intimacy takes a chapter, passage, or key word that Voigt distilled from Luhmann’s book as its source. Voigt begins each drawing by marking the passages in the text that triggered intuitive associations.
Immersion (2018/2019)
Immersion takes as its starting point the process of perception itself. It deals less with exactly what we perceive than how we perceive. The series seeks to develop appropriate forms to understand the inner constitution of archetypal images, that which is behind what we see, and how such images might be experienced or shared collectively. A central element in these works is the torus, a shape that Voigt conceives of as a model for perception, in combination with arrows, axes, and lines. Voigt first began working with these forms in her Lacan Studies from 2016. She begins each work in the Immersion series by immersing paper in pigment. Each color is selected to denote a particular atmosphere or emotional state. A large torus figure forms the central element of the composition and in each variation its dimensions morph and rotate. Voigt describes Immersion as a “time-based series,” with each piece created one after the other and representing a different moment in time. “When you look at the series as a whole you can see the exact connection between those moments,” Voigt explains, “In real life you focus on each moment at a time, and you can’t stop and zoom out in order to see the bigger picture.” Another variable element of the compositions are Voigt’s use of gold and precious metals. She incorporates metal inlays by cutting out sections of the drawings and gilding them with gold, aluminum, and copper leaf and reintegrating the shapes into their original place in the composition.
Museum collections
Jorinde Voigt’s work is included the international museums and public collections, including Centre Pompidou, Paris; Museum of Modern Art, New York; Art Institute of Chicago; Kupferstichkabinett Berlin; Instanbul Modern; the Federal Art Collection Bonn, the Hamburger Kunsthalle, Hamburg; Kunsthaus Zürich; Kunstmuseum Stuttgart; Museum of Contemporary Art, Oslo; and the Grafische Sammlung, Munich.
Exhibitions
2019 Wall Drawings Series: Jorinde Voigt, Menil Drawing Institute, Houston
2019 Jorinde Voigt – Universal Turn, Horst-Janssen-Museum, Oldenburg
2018 Jorinde Voigt – Divine Territory, St. Matthäus Church, Berlin
2017 Jorinde Voigt – A New Kind of Joy, Kunsthalle Nürnberg
2014 Jorinde Voigt – Super Passion, MACRO Museum of Contemporary Art of Rome, Rome
2013 Jorinde Voigt – Systematic Notations, Nevada Museum of Art NMA
2011 Jorinde Voigt, Von der Heydt Museum, Wuppertal
2010 Jorinde Voigt – Staat / Random I-XI, Gemeentemuseum Den Haag
2009 Jorinde Voigt – Symphonic Area, HDKV Heidelberger Kunstverein
2008 Jorinde Voigt - Dualnab Nassauischer Kunstverein Wiesbaden
References
Further reading
Jorinde Voigt: Immersion, texts Paul Feigelfeld and Jesi Khadivi (Berlin: Hatje Cantz, 2019)
Ellen Seifermann (ed), Jorinde Voigt: Shift (Berlin: Walther König, 2018)
David Nolan (ed): Jorinde Voigt: Ludwig Van Beethoven Sonatas 1-3, texts by Franz W. Kaiser and Jorinde Voigt (Berlin: Hatje Cantz, 2015)
Julia Klüser & Hans-Peter Wipplinger (eds), Jorinde Voigt: Now (Berlin: Walther König, 2015)
David Nolan (ed): Jorinde Voigt – Codification of Intimacy, Works on Niklas Luhmann, Liebe als Passion, Text: Lisa Sintermann, Jorinde Voigt, Revolver Publishing, 2014
Jorinde Voigt (eds): Jorinde Voigt – Views on Views on Decameron. Text : Peter Lang, Cura Books, 2013
Kai 10 / Raum fur Kunst, Arthena Foundation (ed): Drawing a Universe. Text: Ludwig Seyfarth, Lisa Sintermann, Kerber Verlag, 2013
David Nolan (ed): Jorinde Voigt – Piece for Words and Views. Text: John Yau, Jorinde Voigt, Hatje Cantz, 2012
Museum van Bommel van Dam (ed): Nachtliches Konzert – Gregor Hildebrandt und Jorinde Voigt. Text: Niklas Maak, 2012
Neues Museum Nurnberg (eds): Internationaler Faber-Castell Preis fur Zeichnung 2012 [International Faber-Castell Prize for Drawing 2012]. Text: Lisa Sintermann 2012
Julia Kluser: Jorinde Voigt – Nexus. Text: Andreas Schalhorn, Lisa Sintermann, Von der Heydt Museum Wuppertal, Hatje Cantz, 2011
Regina Gallery: Jorinde Voigt – 1000 Views. Text: Lisa Sintermann, Jorinde Voigt, 2011
Lisa Sintermann, Die Vermessung des Unsichtbaren – Notationsverfahren in den konzeptuellen Zeichnungen von Jorinde Voigt [Measuring the Invisible -notation method in Jorinde Voigt's conceptual drawings], University of Hildesheim, 2010
Jochen Kienbaum (ed): Jorinde Voigt – Botanic Code, Kienbaum Artists' Books 2011, Snoeck Verlagsgesellschaft, 2010
Jorinde Voigt, Clemens Fahnemann (ed): Jorinde Voigt – ReWrite. Text: Andrew Cannon, KraskaEckstein Verlag, 2008
Elke Guhn, Nassauischer Kunstverein Wiesbaden (ed): Jorinde Voigt – DUAL. Text: Clemens crumbs, Kerber Verlag, 2008
Holger Peter Saupe (ed): Jorinde Voigt – Otto Dix Prize 2008 laureate, Gera Art Collection 2008
German artists
Living people
Year of birth missing (living people) |
Roodhouse is a city in Greene County, Illinois, United States. The population was 1,814 at the 2010 census, down from 2,214 at the 2000 census.
Geography
Roodhouse is located in northern Greene County at (39.482004, -90.371780). U.S. Route 67 passes through the center of the city, leading north to Jacksonville and south to Carrollton, the Greene County seat.
According to the 2010 census, Roodhouse has a total area of , all land.
History
Roodhouse was founded in the 1850s by John Roodhouse. The community was originally known as "The Crossroads" for its position on two major highways, though it was later renamed for its founder. In 1860, John Rawlins convinced the Chicago and Alton Railway to open a station in the community by promising to secure local funds for the depot and warehouse. The railway built its Louisiana branch from Roodhouse in 1871, and the city became a major junction point, boosting its population and economy. Roodhouse was legally incorporated as a city in 1880. Passenger railroad service to Roodhouse ended in the 1950s, causing a local economic downturn which persisted over the following decades.
The Hotel Roodhouse, the city's only surviving hotel from the railroad era, is listed on the National Register of Historic Places.
Demographics
In the census of 2000, there were 2,214 people, 829 households, and 562 families residing in the city. The population density was . There were 919 housing units at an average density of . The racial makeup of the city was 94.17% White, 4.52% African American, 0.09% Native American, 0.09% Asian, 0.41% from other races, and 0.72% from two or more races. Hispanic or Latino of any race were 0.63% of the population.
There were 829 households, out of which 33.8% had children under the age of 18 living with them, 47.9% were married couples living together, 12.9% had a female householder with no husband present, and 32.1% were non-families. 27.5% of all households were made up of individuals, and 14.0% had someone living alone who was 65 years of age or older. The average household size was 2.49 and the average family size was 3.01.
In the city, the population was spread out, with 26.2% under the age of 18, 14.5% from 18 to 24, 26.5% from 25 to 44, 18.7% from 45 to 64, and 14.1% who were 65 years of age or older. The median age was 32 years. For every 100 females, there were 103.7 males. For every 100 females age 18 and over, there were 107.6 males.
The median income for a household in the city was $28,109, and the median income for a family was $33,889. Males had a median income of $27,292 versus $20,500 for females. The per capita income for the city was $12,281. About 14.2% of families and 16.8% of the population were below the poverty line, including 20.3% of those under age 18 and 11.6% of those age 65 or over.
References
Cities in Greene County, Illinois
Cities in Illinois |
Roxas may refer to:
Places in the Philippines
Cities and municipalities
Roxas City
Roxas, Isabela
Roxas, Oriental Mindoro
Roxas, Palawan
Roads
Roxas Boulevard
Paseo de Roxas
Others
Roxas Airport
People
Surname
Gerardo Roxas y Arroyo (fl. 1839–1891), also known as Gerardo Roxas I, Filipino servant during the Spanish Colonial Era
Manuel Roxas (1892–1948), former President of the Philippines and son of Gerardo Roxas y Arroyo
Trinidad Roxas (1900–1995), former First Lady of the Philippines and wife of Manuel Roxas
Gerardo Roxas (1924–1982), also known as Gerry Roxas, Filipino politician and son of Manuel Roxas
Mar Roxas (born 1957), Filipino politician and son of Gerardo Roxas
Gerardo Roxas, Jr. (1960–1993), popularly known as Dinggoy Roxas, Filipino politician and son of Gerardo Roxas
Juno Roxas (born 1967), Australian musician and actor
Rogelio Roxas (fl. 1971–1993), Filipino treasure hunter
Jake Roxas (born 1977), Filipino actor
Van Roxas (born 1989), Filipino actor and television personality
Fictional characters
Roxas (Kingdom Hearts), a character from the Kingdom Hearts video game series
See also
Rojas, reformed spelling
President Roxas (disambiguation)
Roxa (Canhabaque), Guinea-Bissau; an island
Roxà (Rosà), Vincenza, Veneto, Italy; a town |
The Rapirrán River (, ) is a river of South America. Beginning in western Brazil just east of the Peruvian border, the river forms the international border with Peru as it flows eastward. It then forms Bolivia's northernmost border with Brazil.
The town of Rapirrán lies on the river.
See also
List of rivers of Bolivia
References
Rand McNally, The New International Atlas, 1993.
Rivers of Acre (state)
Rivers of Peru
Bolivia–Brazil border
Brazil–Peru border
International rivers of South America
Rivers of Pando Department |
The Hunter 36 Legend is an American sailboat, that was designed by Glenn Henderson and first built in 2001.
The design can be confused with the 1980 Hunter 36, 2008 Hunter 36-2 (sold as the Hunter 36) and the 1990 Hunter 36 Vision, all sailboats with similar names by the same builder.
Production
The design was built by Hunter Marine in the United States, but it is now out of production.
Design
The Hunter 36 Legend is a recreational keelboat, built predominantly of fiberglass.
The design has a fractional sloop B&R rig, a nearly-plumb stem, a walk-through reverse transom, an internally-mounted spade-type rudder controlled by a wheel and a fixed fin keel or wing keel. It displaces and carries of ballast.
The boat has a draft of with the standard keel and with the optional shoal draft winged keel.
The boat is fitted with an inboard engine. The fuel tank holds and the fresh water tank has a capacity of .
The design has a hull speed of .
See also
List of sailing boat types
Similar sailboats
Beneteau 361
C&C 36-1
C&C 36R
C&C 110
Catalina 36
Columbia 36
Coronado 35
CS 36
Ericson 36
Frigate 36
Hunter 36
Hunter 36-2
Hunter 36 Vision
Islander 36
Nonsuch 36
Portman 36
S2 11.0
Seidelmann 37
Watkins 36
Watkins 36C
References
External links
Keelboats
2000s sailboat type designs
Sailing yachts
Sailboat type designs by Glenn Henderson
Sailboat types built by Hunter Marine |
Adki is a village in the southern state of Karnataka, India. It is located in the Sedam taluk of Kalaburagi district.
See also
Gulbarga
Districts of Karnataka
References
External links
http://Gulbarga.nic.in/
Villages in Kalaburagi district |
Southern California Hospital at Culver City is an acute care hospital in Culver City, California.
The hospital is located in Culver City's downtown area. The hospital serves West Los Angeles; providing 24 hour medical service. The hospital is home to the Southern California Hospital Heart Institute.
The hospital expanded from its original eight-bed clinic to 420 beds in three buildings.
History
Southern California Hospital was founded in 1925 by Dr. Foster Hull. In the 1970s, the hospital became the David Brotman Memorial Hospital. In 1984, Michael Jackson was admitted to the hospital due to a serious burn that occurred during a shoot for a Pepsi TV ad. Later, he gave his insurance payment to the hospital. That year the care unit for burn victims was named the "Michael Jackson Burn Center" in his honor. It closed in August 1987 due to financial problems.
In 2005, it became Southern California Hospital. It opened again under the leadership of Prospect Medical Holdings.
Notable employees
Tom Araya, bassist and vocalist for the American thrash metal band Slayer worked there as a respiratory therapist in the early 1980s.
References
External links
This hospital in the CA Healthcare Atlas A project by OSHPD
Hospitals in Los Angeles County, California
Buildings and structures in Culver City, California
Hospital buildings completed in 1924 |
Seongsan is a district in Changwon City, South Korea.
See also
Changwon
Uichang-gu
Masan-Hoiwon-gu
Masan-Happho-gu
Jinhae-gu
References
External links
Districts of Changwon |
Merinthophobia is the fear of being bound or tied up. The origin of the word merintho is Greek (meaning string). Merinthophobia is a specific phobia. The symptoms typically include anxiety, shortness of breath, rapid breathing, irregular heartbeat, sweating, nausea, dry mouth, fainting, inability to articulate words or sentences, or shaking. This fear may stem from an incident in which the person was bound either as a joke or intentionally, or observing someone who is bound, the trauma of such occurrence often stays with an individual for a lifetime. An individual with Merinthophobia will be very uncomfortable watching an illusionist escape from being bound. They may feel sick to their stomach. Treatments for this phobia include counseling, hypnotherapy, and psychotherapy.
See also
List of phobias
References
Mental states |
John Loeffler (born June 3, 1951) is an American music industry executive and executive vice president, head of New York repertoire and marketing for BMG.
In 2019, Loeffler's output included new releases from John Fogerty, The Allman Betts Band feat. Devon Allman and Duane Betts, Marc Cohn and Blind Boys of Alabama, Perry Farrell, Sophie Auster, Jesse Colin Young and Stephen Bishop. Under his leadership new music from Akon, Huey Lewis and the News, Rufus Wainwright, Cheap Trick, and The Allman Betts Band can be expected in 2020.
Prior to being named EVP in January 2019 he served as executive director of global development for BMG and developed joint ventures with music and media companies beyond traditional music platforms. He also represented the label's interests to forge new relationships with iconic artists including Roger Waters, Kenny Loggins, Bad Company, John Fogerty and Earth Wind & Fire.
In 2011, Loeffler launched FieldHouse Music in association with BMG Music Rights and Universal Distribution. The venture established to discover and market new talent through licensing in film, TV and commercials. FieldHouse Music continues as a talent incubator for new artists and songwriters looking to be developed and promoted by a passionate team of experienced professionals.
As a songwriter, record producer and entrepreneur, Loeffler's creative output as CEO of Rave Music, a company which he founded in the mid-1980s, was responsible for producing music for commercials, television, film and other forms of media. Rave Music is perhaps best known for creating the theme music and score for the popular animated television series Pokémon as well as the numerous CDs, films and videos associated with the hit show. Loeffler co-produced most of the music for the English adaptation of the Pokémon anime series, most notably the "Pokémon Theme". Loeffler also produced an album for the series called Pokémon 2.B.A. Master. Additionally, the company produced soundtracks for networks including Country Music Television and HBO as well as music for commercials for Avon and Mitsubishi. More recently, he composed music for Genius Brands' web series SpacePOP.
Before working on Pokémon, Loeffler composed music for various commercials and television shows including the sitcom Kate and Allie (which he also wrote, composed and sang the theme song), the music video show Friday Night Videos and the soap opera Another World as well writing songs for a few films including Backstreet Dreams and Night Visitor.
Loeffler began his career serving as music director for Grey Advertising for over twenty years (1979–2000).
Early life
Attended Williams College,
Bachelor of Arts (B.A.)
Field Of study: political science (major), social psychology and studio art (minors), cum laude
References
External links
Billboard's 2019 Indie Power Players
Rufus Wainwright signs with BMG, Variety.
John Fogerty Inks Deal with BMG, Music Row.
Pokémon Composer John Loeffler, Mania.
Fieldhouse Music
1951 births
American male composers
American male singer-songwriters
American record producers
Anime composers
Living people
Nintendo people |
Thọ Xuân Airport, formerly Sao Vàng Airport (, ) (also known as Thanh Hoá Air Base or Bái Thượng Air Base), is an airport located in Sao Vàng town in Thọ Xuân District, Thanh Hóa Province, 45 km northwest of the provincial capital Thanh Hóa. The airport is currently operated by Vietnam People's Air Force (VPAF).
This airport handled 90,000 passengers in 2013, 160,000 passengers in 2014 and is estimated to serve 550,000 passengers in 2015, an increase of more than 300%
History
Vietnam War
The air base was built in 1968 and was used as a forward staging bases with MiGs temporarily deployed from other VPAF bases.
On the morning of 13 April 1972 the airfield was attacked by B-52s, destroying one MiG-17 and cratering the runway. The base was attacked again by US Navy A-6s in May 1972. On 15 June U.S. fighter-bombers again attacked the base cratering the runway. The base was attacked again on 18 June with further damage to the runway. The base was attacked again on 11 and 12 November 1972 with six craters reported in the runway.
Current use
The base is home to the VPAF 923rd Fighter-bomber Squadron operating the Sukhoi Su-30MKK.
The government of Vietnam implemented an upgrading project to add more civil facilities in order to turn the airport into a mixed civilian/military airport in early 2013. It is planned to become a relief airport for Hanoi's Noi Bai International Airport.
Airlines and destinations
References
External links
Government to implement three airport projects on Vietnamnet.net
Thanh Hoa told to rethink civil airport project Saigon Times
Airports in Vietnam
Thanh Hóa
Buildings and structures in Thanh Hóa province
Installations of the Vietnam People's Air Force |
St Michael's Flags and Angel Meadow Park is a public park in Manchester, England, to the immediate northeast of the city centre, on a slope between the River Irk and Rochdale Road. It occupies an area of acres (3 ha), and was once an affluent suburb, until the 19th-century Industrial Revolution altered the social standing of the area and introduced poverty and disease. Regeneration of the park in the 2000s has created a gateway into the Irk Valley.
History
St Michael and All Angels' church was built in 1788 by Humphrey Owen to seat just over a thousand people. Its foundation stone was laid on 20 May 1788 and it was consecrated on 23 July 1789. Almost twenty years later in 1808, a letter appeared in the Manchester Guardian declaring "Why one of the ugliest churches in Manchester situated in one of the most crowded and notorious parts of the City, should have so long enjoyed the pleasant sounding name 'St Michael's, Angel Meadow' is beyond understanding".
The land adjacent to the church became the largest cemetery in Manchester, used for the interment of those who had no family place of burial or were too poor to afford a proper funeral. The population density of Angel Meadow in the mid-19th century was in excess of 350 per acre, and as social and living conditions worsened some resorted to digging up the cemetery and selling its soil as fertilizer to nearby farmers. The situation became so bad that the Burial Act of 1855 was passed to cover up graveyards with flagstones, hence the name St Michael's Flags. It has been estimated that 40,000 people were buried here.
In 1844, the Oldham Road terminus of the Manchester–Leeds Railway was abandoned and the line extended through Collyhurst to a new link station at Hunts Bank – the first Victoria Station. A railway viaduct traversed Angel Meadow, whilst the obnoxious smells from the Irk and Irwell and the Gould street gas works darkened the landscape.
Ragged schools, such as Charter Street and Sharp Street, and other institutes for abandoned, destitute and neglected children, flourished in the area:
Alexis de Tocqueville, a French political thinker and historian, best known for his Democracy in America (two volumes: 1835 and 1840) and The Old Regime and the Revolution (1856), explored the effects of the rising inequalities in social conditions on the individual and the state in western societies; he visited Manchester in 1835, describing it in his work of the same year Journeys to England And Ireland.
Friedrich Engels was born in 1820 as the son of a successful German industrialist. As a young man his father sent him to England to help manage his cotton factory in Salford. Engels was shocked by the poverty in the city and began writing an account that was published as the Condition of the Working Classes in England (1844). His account, of what he labeled the "Irish town", includes a graphic description of the pauper burial ground at St. Michael's Flags. Engels later collaborated with Karl Marx, which resulted in the Communist Manifesto.
The Flags became known for hosting prostitutes, street entertainers, Cock fights and bare knuckle brawls, with gathered crowds gambling on the competitions, in the second half of the 19th century. Territorial gangs, of adolescent Scuttlers, fought for the control of the neighbouring streets, while numerous pawn shops and marine stores fenced items pickpocketed or robbed by the street gangs, and beer shops offered an illicit potato derived spirit, known as poteen.
St Michael's Church, graveyard, and surrounding streets regularly featured in the paintings of L. S. Lowry.
St Michael's Church closed in 1930 and the site was sold on condition that the church building was demolished. Demolition was carried out in 1935. In 1940 Angel Meadow was subject to German bombing.
Regeneration
Friends of Angel Meadow (FOAM) was formed in 2004 to campaign for the regeneration of the park and to research the history of the area. Over £200,000 was raised through grants and match funding, which was spent re-landscaping the park, installing street furniture including seating and bins, erecting four solar-powered street lights, an arched entrance way and planting wildflowers.
A Local Heritage Grant of £24,000 paid for six history boards and the publication of an information booklet.
In the spring of 2006, the park hosted the BBC and Manchester Leisure's Springwatch Festival of Nature. Since 2006 it has attained Green Flag Award status, the national award for green spaces in England and Wales.
On 1 May 2010, the park was used as a location by artist Spencer Tunick for his installation Everyday People, part of The Lowry's 10th Anniversary celebration.
Oxford Archaeology carried out excavations around the park in 2009, 2012 and 2019, revealing the basements of homes and business in the area from the 1800s.
The Royal Geographical Society Discovering Britain series of walks: Slums, Squalor and Salvation guides people around the park and wider neighbourhood.
In August 2012, BBC television broadcast scenes of the area as part of Michael Wood's The Great British Story: A People's History (Episode 8 Industry & Empire).
A second phase of funding for the park has been secured and work should be completed by early summer 2014. This work will include repairing the Aspin Lane wall and opening up the steps into the park, often referred to as the Lowry Steps (as L S Lowry depicted them in several of his works).
The Co-operative Group is also funding a significant programme of work in 2015 to rebuild the front entrance and improve the whole park overall. This is being funded from the grant given to The Co-operative from the European Regional Development Fund to create the NOMA district of Manchester city centre.
References
Notes
Bibliography
Further reading
Busteed M. Angel Meadow:The Irish and Cholera in Manchester From Exploring Greater Manchester: A Fieldwork Guide edited by Paul Hindle
Journeys to England and Ireland (1835); by Alexis de Tocqueville
Condition of the Working Classes in England (1844); by Friedrich Engels
25 Years of Detective Life - a Fascinating Account of Crime in Victorian Manchester (1895); by Jerome Caminada
Different Times (2006); by William Kenneth Jones {https://www.amazon.co.uk/s?k=William+Kenneth+Jones&i=stripbooks&ref=nb_sb_noss_2}
Gangs of Manchester (2008); by Andrew Davies
Fictional accounts using Angel Meadow as a backdrop
The Manchester Man (1879); Mrs G. Linnaeus Banks
Angel Meadow (1999); by Audrey Howard
Nancy (2011); by William Kenneth Jones {https://www.amazon.co.uk/s?k=William+Kenneth+Jones&i=stripbooks&ref=nb_sb_noss_2}
External links
Friends of Angel Meadow
The Guardian article April 24, 2005
Manchester Evening News article March 22, 2003
Groundwork Manchester, Salford & Trafford Ltd
Local Heritage Initiative Website with photos of the FOAM and links to an electronic copy of the history booklet
The fifth biodiversity hotspot award goes to Angel Meadows
Angel Meadow: "Hell upon Earth"; BBC Manchester; 2 September 2009 (quotes courtesy of The Gangs of Manchester by Andrew Davies and The Condition of the Working Class in England by Friedrich Engels (1844))
Parks and commons in Manchester |
Milestones Restaurants Inc. (doing business as Milestones Grill and Bar) is a restaurant chain owned by Foodtastic. There are currently over 40 locations across British Columbia, Alberta, New Brunswick, Ontario, and Quebec.
History
The first Milestones location opened on Denman Street in Vancouver, British Columbia in 1989. In 2002, Cara (now known as Recipe Unlimited) purchased a majority stake in the restaurant from the previous parent company, BC-based Spectra Group, Inc. Prior to Cara's acquisition, nearly all Milestones restaurants were located in British Columbia, with four locations in Ontario and one in Washington state. Cara rapidly expanded Milestones operations into eastern Canadian cities, including Toronto, Ottawa, Niagara Falls, and London. At the end of 2011, Milestones expanded into Kingston, Barrie, Waterloo, and Cambridge. On July 14, 2021, Montreal based restaurant franchiser Foodtastic acquired Milestones.
See also
List of Canadian restaurant chains
List of assets owned by Recipe Unlimited
References
External links
Recipe Unlimited
Restaurants in British Columbia
Restaurants established in 1989
Restaurant chains in Canada
Companies based in Vaughan
1989 establishments in British Columbia
2002 mergers and acquisitions |
Daniel Wheeler Bursch (born July 25, 1957) is a former NASA astronaut, and Captain of the United States Navy. He had four spaceflights, the first three of which were Space Shuttle missions lasting 10 to 11 days each. His fourth and final spaceflight was a long-duration stay aboard the International Space Station as a crew member of Expedition 4, which lasted from December 2001 to June 2002. This 196-day mission set a new record for the longest duration spaceflight for an American astronaut, a record simultaneously set with his crew mate Carl Walz. Their record has since been broken, and as of 2016 it is held by Scott Kelly, who flew a 340-day mission during Expeditions 43, 44 and 45.
Education
Bursch graduated from Vestal Senior High School, Vestal, New York, in 1975; received a Bachelor of Science degree in Physics from the United States Naval Academy in 1979, and a Master of Science degree in Engineering Science from the U.S. Naval Postgraduate School in 1991.
Navy career
Bursch graduated from the U.S. Naval Academy in 1979, and was designated a Naval Flight Officer in April 1980 at Naval Air Station Pensacola, Florida. After initial training as an A-6E Intruder bombardier/navigator (B/N), he reported to VA-34 in January 1981, and deployed to the Mediterranean aboard the aircraft carrier , and to the North Atlantic and Indian Oceans aboard . He attended the U.S. Naval Test Pilot School in January 1984. Upon graduation in December he worked as a project test flight officer flying the A-6 Intruder until August 1984, when he returned to the U.S. Naval Test Pilot School as a flight instructor. In April 1987, Bursch was assigned to the commander, Cruiser-Destroyer Group 1, as strike operations officer, making deployments to the Indian Ocean aboard the cruiser and the carrier . Redesignated an Aeronautical Engineering Duty officer (AEDO), he attended the U.S. Naval Postgraduate School in Monterey, California, from July 1989 until his selection to the astronaut program.
He has flown over 3,430 flight hours in more than 35 different aircraft.
Astronaut career
Selected by NASA in January 1990, Bursch became an astronaut in July 1991. His technical assignments to date include: Astronaut Office Operations Development Branch, working on controls and displays for the Space Shuttle and Space Station; Chief of Astronaut Appearances; spacecraft communicator (CAPCOM) in mission control. A veteran of four space flights, Bursch has logged over 227 days in space. He was a mission specialist on STS-51 (1993), STS-68 (1994) and STS-77 (1996), and served as flight engineer on International Space Station Expedition 4 (2001–2002). Dan Bursch and fellow astronaut Carl Walz completed one of the longest U.S. space flights of 196 days in space. In January 2003, Bursch reported to the Naval Postgraduate School for a two-year assignment as an instructor in the Space Systems Academic Group.
He left NASA in May 2005 and later retired from active duty in July 2005 after 26 years of service in the U.S. Navy. Bursch joined The Aerospace Corporation in July 2005 and is currently serving as the National Reconnaissance Office (NRO) Chair at the Naval Postgraduate School.
STS-51
STS-51 launched from the Kennedy Space Center, Florida, on September 12, 1993. During the ten-day mission the crew of five aboard the deployed the U.S. Advanced Communications Technology Satellite (ACTS), and the Shuttle Pallet Satellite (SPAS) with NASA and German scientific experiments aboard. Following a spacewalk by two crew members to evaluate Hubble Space Telescope repair tools, the crew initiated rendezvous burns and Bursch recovered the SPAS using the Remote Manipulator System (RMS). The mission concluded on September 22, 1993, with the first night landing at the Kennedy Space Center. Mission duration was 236 hours and 11 minutes.
STS-68
STS-68, Space Radar Lab-2 (SRL-2), launched from the Kennedy Space Center, Florida, on September 30, 1994. As part of NASA's Mission to Planet Earth, SRL-2 was the second flight of three advanced radars called SIR-C/X-SAR (Spaceborne Imaging Radar-C/X-Band Synthetic Aperture Radar), and a carbon-monoxide pollution sensor, MAPS (Measurement of Air Pollution from Satellites). SIR-C/X-SAR and MAPS operated together in Endeavours cargo bay to study Earth's surface and atmosphere, creating radar images of Earth's surface environment and mapping global production and transport of carbon monoxide pollution. Real-time crew observations of environmental conditions, along with over 14,000 photographs aided the science team in interpreting the SRL data. The SRL-2 mission was a highly successful test of technology intended for long-term environmental and geological monitoring of planet Earth. Following 183 orbits of the Earth, the eleven-day mission ended with Space Shuttle Endeavour landing at Edwards Air Force Base, California, on October 11, 1994. Mission duration was 269 hours and 46 minutes.
STS-77
STS-77 launched from the Kennedy Space Center on May 19, 1996. It included the fourth Spacehab module flight as a scientific laboratory, designated SPACEHAB-4. It consisted of 12 separate materials processing, fluid physics and biotechnology experiments, with an emphasis on commercial space product development. STS-77 completed a record four rendezvous in support of two satellites sponsored by the Goddard Space Flight Center, and the SPARTAN 207/Inflatable Antenna Experiment (IAE) and the Passive Aerodynamically stabilized Magnetically damped Satellite/Satellite Test Unit (PAMS/STU). Following 160 orbits of the Earth, the ten-day mission ended with Space Shuttle Endeavour landing at the Kennedy Space Center on May 29, 1996. Mission duration was 240 hours and 39 minutes.
Expedition 4
The Expedition 4 crew launched on December 5, 2001 aboard STS-108 and docked with the International Space Station on December 7, 2001. During a 6½ month stay aboard the Space Station, the Expedition 4 crew of three (two American astronauts and one Russian cosmonaut) performed flight tests of the station hardware, conducted internal and external maintenance tasks, and developed the capability of the station to support the addition of science experiments. The crew spent 196 days in space establishing a U.S. space flight endurance record for Dan Bursch and crew mate Carl Walz. Wearing the Russian Orlan spacesuit, Bursch logged 11 hours and 48 minutes of EVA time in two separate spacewalks. The Expedition-Four crew returned to Earth aboard STS-111, with Endeavour landing at Edwards Air Force Base, California, on June 19, 2002.
Special honors
Awarded the Defense Superior Service Medal, NASA Space Flight Medals, the Navy Commendation Medal and the Navy Achievement Medal. Distinguished graduate, U.S. Naval Academy and U.S. Naval Test Pilot School.
Personal life
Daniel Bursch was born in Bristol, Pennsylvania, but he considers Vestal, New York, to be his hometown. He has four children, two daughters and two sons, and two grandchildren, and he is married to Sharon Yencharis.
References
External links
Dan Bursch's Personal Website
1957 births
Living people
United States Navy astronauts
Crew members of the International Space Station
People from Bristol, Pennsylvania
People from Vestal, New York
United States Naval Academy alumni
United States Naval Test Pilot School alumni
Naval Postgraduate School alumni
Naval Postgraduate School faculty
United States Navy officers
United States Naval Flight Officers
United States Naval Aviators
Recipients of the Defense Superior Service Medal
Space Shuttle program astronauts
Spacewalkers
Military personnel from Pennsylvania |
Kanalen (The Canal) is a local Norwegian newspaper published in Ulefoss in Telemark county.
History
Kanalen was established by Jan Arve Andersen in 2001, and it has covered events in the municipality of Nome since 2012; prior to this it also covered news in the municipality of Sauherad. It is currently edited by Tor Espen Simonsen. From 2003 to 2012 the newspaper was completely owned by the newspaper Varden. The paper's employees currently hold the majority of shares in the company.
The name Kanalen is derived from the Telemark Canal. The waterway and its locks run across the municipality of Nome and help link together the two largest urban areas, Ulefoss and Lunde. The newspaper serves the same purpose as a channel for media.
Kanalen is neutral in the choice between Bokmål and Nynorsk, but in practice it has been a Bokmål publication since it was launched. The municipality of Nome is composed of towns with very different social, cultural, and historical origins. The newspaper therefore emphasizes news and topical matters, prioritizing political, business, and social journalism.
Kanalen follows the Ethical Code of Practice for the Norwegian Press and distinguishes itself from the local newspaper tradition with a critical and socially oriented approach. The paper is a member of the National Association of Local Newspapers.
Editors
Jan Arve Andersen (2001–2006)
Jarle Aaheim (2006–2009)
Britt Eriksen (2009–2012)
Tor Espen Simonsen (February 2012–)
Circulation
According to the Norwegian Audit Bureau of Circulations and the National Association of Local Newspapers, Kanalen has had the following annual circulation:
2004: 1,869
2005: 2,130
2006: 2,069
2007: 2,020
2008: 2,049
2009: 1,909
2010: 1,800
2011: 1,744
2012: 1,774
2013: 1,845
2014: 1,893
2015: 1,959
2016: 1,842
References
External links
Kanalen home page
Newspapers published in Norway
Norwegian-language newspapers
Mass media in Telemark
Nome, Norway
Newspapers established in 2001
2001 establishments in Norway |
Sultanpur Khera is a village in Sataon block of Rae Bareli district, Uttar Pradesh, India. As of 2011, its population is 7,619, in 1,384 households. It has 4 primary schools and no healthcare facilities. Sultanpur Khera hosts two festivals: one is dedicated to Parvin Devi and takes place on Chaitra Sudi 9, and the other is dedicated to Purvi Devi and takes place on Asvina Sudi 9. Vendors bring earthenware pottery, bangles, and various everyday items to sell at both festivals.
The 1961 census recorded Sultanpur Khera as comprising 14 hamlets, with a total population of 3,396 people (1,714 male and 1,682 female), in 646 households and 593 physical houses. The area of the village was given as 2,065 acres. It had a post office at that point, as well as the following small industrial establishments: 2 grain mills, 5 producers of edible fats and/or oils, 1 clothing manufacturer, and 1 manufacturer of ammunition, fireworks, or other explosives. Average attendance of both Devi festivals was about 500 people.
The 1981 census recorded Sultanpur Khera as having a population of 4,626 people, in 882 households, and having an area of 811.42 hectares. The main staple foods were given as wheat and rice.
References
Villages in Raebareli district |
The 1983 McDonald's All-American Boys Game was an All-star basketball game played on Saturday, April 9, 1983 at the Omni Coliseum in Atlanta, Georgia. The game's rosters featured the best and most highly recruited high school boys graduating in 1983. The game was the 6th annual version of the McDonald's All-American Game first played in 1978.
1983 game
The East team could count on the two top guards from the state of New York: Kenny Smith and Dwayne "Pearl" Washington, and also had several of the top 10 players of the class. The West had top-ranked forward Winston Bennett and center Joe Wolf. The East dominated the first half and at halftime led the score 73 to 62. The West came back during the second half, guided by two Kentucky commits: James Blackmon and Winston Bennett. With 4:31 remaining, the West was still 11 points behind, but an 11-0 run tied the score. The decisive layup was scored by Blackmon with 9 seconds remaining on the clock: Dwayne Washington scored a layup with 1 second left, but the officials called a charge and the basket did not count. The West won the game 115 to 113: Washington (11 points and 8 assists) was named MVP together with Bennett, who scored 21 points. Other players who had good performances were Tom Sheehey (the top scorer of the game with 22 points), Blackmon (21 points), Bruce Dalrymple (16) and Michael Smith (15). Of the 25 players, 12 went on to play at least 1 game in the NBA.
East roster
West roster
Coaches
The East team was coached by:
Head Coach Buddy Gardler of Cardinal O'Hara High School (Philadelphia, Pennsylvania)
The West team was coached by:
Head Coach Joe Treat of Bryant High School (Bryant, Arkansas)
References
External links
McDonald's All-American on the web
McDonald's All-American all-time rosters
McDonald's All-American rosters at Basketball-Reference.com
Game stats at Realgm.com
1982–83 in American basketball
1983
1983 in sports in Georgia (U.S. state)
Basketball competitions in Atlanta
1980s in Atlanta |
```javascript
import React, { Component } from 'react';
import Editor, { createEditorStateWithText } from '@draft-js-plugins/editor';
import createHashtagPlugin from '@draft-js-plugins/hashtag';
import editorStyles from './editorStyles.module.css';
import hashtagStyles from './hashtagStyles.module.css';
const hashtagPlugin = createHashtagPlugin({ theme: hashtagStyles });
const plugins = [hashtagPlugin];
const text =
'In this editor, we can even apply our own styles #design #theme';
export default class CustomHashtagEditor extends Component {
state = {
editorState: createEditorStateWithText(text),
};
onChange = (editorState) => {
this.setState({
editorState,
});
};
focus = () => {
this.editor.focus();
};
render() {
return (
<div className={editorStyles.editor} onClick={this.focus}>
<Editor
editorState={this.state.editorState}
onChange={this.onChange}
plugins={plugins}
ref={(element) => {
this.editor = element;
}}
/>
</div>
);
}
}
``` |
John King is a fictional character appearing in American comic books published by Marvel Comics.
Publication history
King first appeared in the MAX miniseries the Hood issue one in 2002, appearing in all six issues. After a five-year hiatus then reappeared in the New Avengers miniseries The Trust, and appeared in Secret Invasion issue four. He was a recurring character in the Dark Reign Hood series, which began in 2009, and recently appeared in The Siege: Storming Asgard miniseries.
Fictional character biography
John King is a former drug addict and alcoholic. At one point he fought and was defeated by the Rocket Racer. King is the cousin of Parker Robbins (who would later become the Hood). King and Robbins were close friends and both worked as criminals in New York City. The two attempt to raid a warehouse said to be housing a valuable cargo, where the demon Nisanti attacks John King. In retaliation, Robbins shoots and kills it. King then returns home to his apartment, where Robbins visits him and tells him that the costume he stole off the demon he killed has granted him super powers. John King then informs Robbins of a diamond heist which is taking place, and the two attempt to interfere and steal the diamonds. However, Robbins accidentally shoots a police officer and John King tells him to escape saying that he will take the blame. More police then arrive and John King is taken into custody where he is told that he will be put on trial for shooting the police officer unless he testifies that he was only the Hood's accomplice. John King refuses to claim that Robbins was the real culprit. Robbins them frames Madame Rapier for shooting the police officer which allows John King to be set free.
Following the "Civil War" storyline, John King was with Hood when he puts together his crime syndicate to take advantage of the Superhuman Registration Act. He attended Owl's auction where he was auctioning off a Deathlok replica until Hood attacked the auction and cause the apparent death of Owl. Later, John King was with Hood at Hank's Bar to eat and drink until they are attacked by Wolverine who overheard their plans with the Deathlok replica. John King and Hood managed to get away from Wolverine. John King was at Hood's meeting at a Chinese restaurant and was seen watching the beating on Tigra. John King told Hood and the other villains that they can use the Deathlok replica to rob the Brown Brothers Harriman & Co. Bank. Everyone agreed to the plan. After the successful bank robbery, John King was with Hood when he and his villain allies were present at watching the New Avengers fighting the Symbiotes on TV. The New Avengers raided the hideout and attacked Hood, John King, and the other villains. John King was among those apprehended by the New Avengers.
During the "Secret Invasion" storyline, John King came upstairs when Hood decided to lead his crime syndicate to fight the Skrulls.
During the Dark Reign storyline, John King was made into the Hood's lieutenant. Noticing John King's alcoholism, Hood discusses the situation of his demonic cloak. Upon pulling Hood out of his burning hideout, John King gives Hood a way to contact Satana. John King accompanied some villains to go out drinking. He was then arrested by Force and the authorities who learned that he worked for the Hood. Hood had Norman Osborn bail out John King and the other villains. John King carried out another heist for the Hood, this time giving instructions to Squid and Man-Fish to raid a cargo ship and to steal the equipment in the hold. John King then followed Hood into fighting Force only for him to witness Hood's villain allies be defeated by White Fang. John King later told Hood about Controller's manufacturing of the discord amongst Hood's villain allies.
John King later told Hood about Jonas Harrow taking Hood's army of villains' away.
After the "Siege of Asgard", the New Avengers captured John King and use him to track the Hood and Madame Masque. After a battle with Count Nefaria, they capture the villains and bring all four of them to Maria Hill to place them under arrest.
John King is later approached by a revived Thanos to join up with his incarnation of the Zodiac where he led the team as Cancer. Zodiac's mission was to steal different powerful items and take them out from Earth in order to bring balance to the planet and the cosmos. Captured after a battle with the Avengers, John King reveals Thanos's plan to the heroes.
Powers and abilities
King possesses no superhuman powers or abilities.
As Cancer, John King wears a special super-suit given to him by Thanos that gives him the appearance of a humanoid crab.
References
External links
John King at Marvel Wiki
John King at Comic Vine
John King at Comic Book Database
2002 comics debuts
Characters created by Kyle Hotz
Characters created by Brian K. Vaughan
Fictional characters from New York City
Fictional gangsters
Marvel Comics characters |
Phil Murphy became the 56th Governor of New Jersey on January 16, 2018. He won re-election in 2021, becoming the first Democrat since Brendan Byrne in 1977 to do so. His first term, overshadowed by the COVID-19 pandemic, has been characterized as establishing the already liberal-leaning state as one of the nation's most progressive.
Election, transition, and inauguration
Murphy, a Democrat, was elected on November 7, 2017, in the New Jersey gubernatorial election. His election made New Jersey the seventh state in the US where control of the legislative and executive branches fell to Democrats. His transition team comprised over 500 persons who produced 14 reports with recommendations. He was sworn in at the Trenton War Memorial on January 16, 2018, for a term of four years. An inaugural ball was held at MetLife Stadium in the Meadowlands.
In 2019, opponents of Murphy launched a recall petition effort seeking to recall him from office. The petition organizers failed to obtain enough voter signatures to trigger a recall election.
In November 2021, Murphy was re-elected for a second term, the first Democratic Governor of New Jersey to win re-election since Brendan Byrne in 1977.
Cabinet
As of 2018, there were 24 cabinet positions within the executive branch of the Government of New Jersey. Most cabinet nominees need to be confirmed by the New Jersey Senate before assuming their respective positions. Murphy had announced most nominations prior to his inauguration; some nominees have held their positions in prior administrations. In August 2018, Murphy created the New Jersey Commission on Science, Innovation and Technology, naming Beth Simone Noveck as Chief Innovation Officer. Women make up more than 50% of the cabinet.
Environment and energy
RGGI and Paris Accord
On November 29, 2011, New Jersey withdrew from the Regional Greenhouse Gas Initiative, effective January 1, 2012. Murphy has said he would sign legislation to re-join.
On January 29, 2018, Murphy signed an executive order reinstating New Jersey back into the Regional Greenhouse Gas Initiative.
In February 2018 he signed legislation committing New Jersey to the Paris Agreement.
In February 2022 he announced the state would use $70 of funding from RGGI to support electrification of medium- and heavy-duty trucks.
Energy Master Plan
In June 2019 Murphy revealed a draft Energy Master Plan, which envisions New Jersey as being 100% reliant on sustainable energy by 2050.
Clean energy
In February 2022 he signed an executive order setting a goal of having 100% clean electricity by 2035, moving the target 15 year earlier.
Fracking, offshore drilling, and PennEast Pipeline
Murphy is planning to make permanent a temporary ban on fracking in the state that has been in place since 2010.
The Trump administration has proposed opening almost all federal waters to offshore drilling, including off the coast of the Jersey Shore, and dividing them into sections and auctioning leases to oil companies. The Murphy administration has joined 11 other East Coast states in expressing concern that the plan disregards "vital state interests, economies, and resources".
The Murphy administration opposes the condemnation state owned properties to construct the PennEast Pipeline.
Wind power
In January 2018, Murphy signed an executive order to revive subsidies for wind power in the state. In September 2018, the state began to solicit bids for projects off-shore.
In June 2019, the state awarded a contract for Ocean Wind, a windfarm 15 miles off Atlantic City.
Clean Water Rule
In February 2018, NJ joined nine other states in suing the U.S. Environmental Protection Agency for suspending the Clean Water Rule
New power plant
In October 2019, Murphy officially opposed construction of a new power plant in New Jersey Meadowlands in North Bergen.
Plastics
Murphy supports strict regulation on the use of single-use plastic bags, straws, and styrofoam. A ban came into effect in 2020.
Transportation
New Jersey Transit
Following campaign promises to improve both infrastructure and the safety record of New Jersey Transit, the state-run public transportation agency, Murphy requested, in January 2018, resignation letters from approximately 20 senior staff members, and signed an executive order calling for a complete audit. Kevin S. Corbett was appointed director of the agency in January 2018.
In December 2018, Murphy signed into law new legislation which would overhaul the way NJT is managed.
In 2019, Murphy proposed using NJ Transit stations and surrounding land to develop more transit-oriented development & urban transit hub commercial, residence, and recreational communities.
Gateway Project
Murphy supports the Gateway Project, which would expand and renovate the Northeast Corridor (NEC) rail line between Newark and New York Penn Station.
Port Authority Bus Terminal
Murphy supports the development of solutions of problems created by the aging, overcrowded Port Authority Bus Terminal.
Vehicle electrification
In February 2022 he announced that New Jersey would begin rulemaking to follow California's standard of all new car sales being electric vehicles by 2035.
Health and public safety
Opioid crisis
In February, the New Jersey Attorney General announced the newly formed Office of the New Jersey Coordinator for Addiction Response and Enforcement Strategies (NJ CARES) within the New Jersey Department of Law and Public Safety, statewide initiative to combat the opioid crisis. The administration considering making Narcan, used to reverse the effects of and overdose, available for free.
Reproductive services funding
In February 2018, Murphy signed his first piece of legislation, the restoration of $7.5 million annual funding for Planned Parenthood, which had been cut early in the Christie administration. In 2020 funding reached $9.5 million.
Firearm regulation
Murphy has said he would support strengthening regulation of firearms in New Jersey. The mandate established in the Childproof Handgun Law may be re-visited. A memorandum of agreement with other Northeast states allows New Jersey to share info on weapons in a database. As of February 2018, new laws regarding firearms were negotiated in the New Jersey Legislature. Several passed the Assembly, but have not advanced in the Senate.
In April 2018, Murphy signed an executive order for the state to issue online reports online about gun crimes including location, number of killed or injured, type of weapon, and state in which involved guns originated.
In June 2018, Murphy signed six new laws regulating gun ownership. In October federal courts upheld a rule limiting ammunition to 10-round cartridges.
In October 2018, Murphy signed into law a ban on "ghost guns" and 3-D printable guns
In April 2019, Murphy proposed increasing firearms fees, which have not been adjusted since the 1960s.
Health insurance mandate
Effective January 1, 2018, all New Jersey residents are required by law to have health insurance. The administration intends to preserve most protections provided by the Patient Protection and Affordable Care Act (so-called Obamacare), should that federal program be overturned or de-funded. In January 2020, Murphy signed legislation which align with policies of the ACA.
Emergency housing assistance
In February 2019, Murphy vetoed a law that had overwhelmingly passed in the State Legislature to provide emergency housing assistance. The bill would have covered those who are homeless or in danger of becoming homeless. A person or family could receive this assistance only once (in seven years) for one 12-month period, with a possible six-month extension. The bill sought to let a person or family become eligible for the housing aid again after seven years had passed.
Aid in dying
On April 13, 2019, Gov. Murphy signed a law allowing terminally ill New Jerseyans with less than six months to live to end their lives with the assistance of a doctor. It became effective August 1, 2019.
Coronavirus pandemic
The first case of the coronavirus was reported on March 5, 2020, when a 32-year-old man from Fort Lee, Bergen County, tested positive. Murphy ordered a near 'lockdown' on March 23 at 9 pm via executive order. As of April 11, 2020 he had signed 24 executive orders to deal with the pandemic. April 28 saw the highest number of deaths in the state. Murphy met with President Donald Trump on April 30, 2020, to discuss how to proceed. On May 4 he ordered that schools remain closed for the duration of the school year. In May 2020 interview Murphy said with regard to loosening restrictions in the state: “But here is the reality: Public health creates economic health. It is not the other way around. And if we transpose those steps or if we jump the gun irresponsibly, we throw — based on any amount of evidence — gasoline on the fire and it gets a lot worse. Never mind from a public health standpoint, the economic health gets a lot worse.” As of May 15, 2020, the state counted 10,000 deaths. Approval rating for Murphy rose for his handling of the crisis. On June 24, the state imposed self-quarantine restrictions on persons arriving from other U.S states where corona cases were spiking.
At the end of June 2020, Murphy reversed his decision to allow for indoor dining (part of the 2nd phase of the state's re-opening) after dramatic spikes in cases in other states and behaviour by "knuckleheads" in some restaurants. He implemented a 14-day quarantine for those visiting from 'high-risk' states. The July 7, 2020 primary election was conducted mostly by mail and was seen as an experiment for the November election. On July 8, Murphy signed an executive order mandating the use of face masks outdoors (with exceptions) where social distancing was not possible. The state has released persons held in both state and county prisons to reduce deaths by the COVID-19. In early August Murphy paused or rescinded certain aspects of the phased 'reopening' of New Jersey after cases in the state increased after a period of decline. In mid-August Murphy announced that the November 2020 election would be hybrid, with "mostly" mail-in balloting.
The Murphy Administration presided over the issuance by the New Jersey Government of $1.2 million in fines to Atilis Gym, a gym that defied Governor Murphy's Covid shutdown policies.
On June 5, 2021 Murphy signed an executive order ending the public health emergency, while retaining some executive privileges and restrictions.
Social rights
Marijuana
Cannabis in New Jersey is legal for possession and use in both medical and recreational cases, but recreational distribution remains illegal. Murphy promised to legalize recreational marijuana within the first 100 days of his administration. Despite a Democratic super majority in the New Jersey Assembly and State Senate, there has been opposition within his own party as well as some Republicans, thus casting doubt on the passage of such legislation. Some legislators have proposed broader decriminalization instead of legalization. A bill allowing for both recreational marijuana (for users over twenty-one years) and an expansion of medical marijuana was presented to the NJ Senate in June, 2018. In February 2019, it was announced that Murphy and New Legislature had agreed to tax marijuana sales by weight, rather than with a sales tax. Legalization would also allow for expungement for previous arrests. Support for legalization by New Jersey residents is polled at above 50%.
Sixty municipalities in the state have passed resolutions to ban the sale within their respective borders. A vote on the bill to legalize was withdrawn on March 25, 2019, when it appeared there was not enough support to pass it.
The amount in the possession of the previously convicted eligible for expungement remains contentious. With the unlikelihood of legalization, further decriminalization is being considered. The issue was taken up as a referendum and was passed by voters in November 2020.
On Monday, February 22, 2021, Murphy signed three bills into law legalizing and decriminalizing marijuana. The legislation creates a regulated marijuana industry and addresses the disproportionate arrests of people of color over marijuana possession. He said: “As of this moment, New Jersey’s broken and indefensible marijuana laws, which permanently stained the records of many residents and short-circuited their futures, and which disproportionately hurt communities of color and failed the meaning of justice at every level, social or otherwise, are no more.” Numerous municipalities have restricted the sale of marijuana within them.
Employee rights
Murphy has said he would support legislation to close the gender pay gap and increase the minimum wage to $15 per hour. His first official action as governor was an executive order to support equal pay for women in the state government. In April 2018 he signed legislation making it illegal to pay a woman less than a man for the same job unless there is viable reason. In May 2018, Murphy signed into law legislation requiring that all employees be entitled to pay sick leave based on the previous year's number of worked hours. In January 2019 he worked with legislative leaders to reach an agreement to raise the minimum wage in 2019 to $10 per hour and to $15 per hour by 2024. Murphy signed the bill in February 2019 with the first wage hike to take effect by July 1, 2019 with the wage going up to $10 an hour. A law effective January 1, 2020 made it illegal to ask for previous salary histories.
Immigrants
Murphy has said that he would make the state more welcoming for its undocumented immigrant population. He has said he is committed to creating an Office of Immigrant Protection, to assist those facing deportation with legal assistance. The administration is seeking funds for law enforcement being withheld by the Trump administration for what it claims are sanctuary cities. New guidelines for how local police interact with ICE and immigrants became a source of contention for federal authorities. It has been challenged by some county governments.
In April 2018, Murphy signed a bill to let unauthorized immigrants who are residents of New Jersey apply for college financial aid.
On December 19, 2018 Murphy signed legislation paving the way for immigrants to receive drivers license without necessarily revealing their immigration status.
Minimum age for legal marriage
On June 22, 2018, Murphy signed a law raising the legal age for marriage in New Jersey to eighteen.
Automatic voter registration
In March 2018, Murphy signed legislation which automatically registers all those who apply for a driver's license or state ID to vote.
Third gender birth certificates
In July 2018 Murphy signed into law legislation to allow for third gender birth certificates, including the designation "X", which became effective January 2019.
Limitations on solitary confinement
In June 2019, Murphy signed a law severely restricting the use of solitary confinement in New Jersey prisons.
Statute of limitations on sexual abuse
In May 2019, Murphy signed legislation expanded the time period during which victims of sexual abuse can sue their alleged abusers and affiliated organizations.
Economy and taxation
Federal tax deductions and municipal charitable funds
The Murphy administration faces severe fiscal challenges with the reduction of allowable deductions for federal taxes. He supports the creation of municipal charitable funds in lieu of taxation. The state has adopted regulations allowing New Jersey's municipalities, counties, and school districts to accept some real estate taxes as charitable donations to help residents get around a $10,000 limit on state and local tax deductions under the 2018 federal tax overhaul. New Jersey sued the federal government when the IRS dis-allowed the regulation. A federal judge dismissed the case, saying that New Jersey and three other states had not proved that it was unconstitutional.
Millionaires tax and sales tax changes
Murphy's proposed 2018 budget included various new sources of revenue, a return to sales tax rate of 7% (3.5% on UEZ areas), including ride sharing services and home sharing services, and closing corporate tax loop-holes.
Murphy has said he would consider increasing the so-called "millionaires' tax", increasing the rate of taxation for high-income (over $1 million) households in order to increase state revenue. Murphy proposed returning the sales tax 7%, which was reduced to 6.625% in 2018.
In June 2018, Murphy signed a law extending reduced sales tax in many of New Jersey's cities. In June 2018, Murphy and the New Jersey Assembly agreed to a last-minute deal in which income over $5 million and corporate tax would be raised, while the sales tax would remain the same. In 2019, Murphy again promoted a "millionaires' tax" as part of the state budget, suggesting that legislation be put before the New Jersey Legislature. In September 2020, Murphy and legislators agreed increase tax on incomes over $1 million, by 2%, and give $500 tax rebate to families earning under $150,000.
EDA tax incentives and investigation
In January 2018, Governor Phil Murphy signed an executive order to initiate an audit of the tax incentives made to businesses by the New Jersey Economic Development Authority (EDA), saying that oversight of the programs was insufficient and had not been properly regulated. The audit, released in January 2019, found the EDA may have “improperly awarded, miscalculated, overstated and overpaid” tax credits. The task force created to investigate has been challenged in a court case by some of the recipients of the incentives, including board member George Norcross. Norcross has filed lawsuit against Murphy and has asked for a restraining to halt the investigation. That was denied.
It was found that at least 12 companies had not fulfilled their incentive requirements. Former governor Chris Christie, under whose administration many deals were made, called the investigation a charade. Murphy and the state legislation disagreed on how to re-vamp the incentive program.
State-owned bank
Murphy has proposed establishing a state-owned bank, which would hold public funds normally kept in commercial banks and be used for economic stimulus. In November 2019 he signed an executive order to create it. Some members of the New Jersey Senate have said they will not support the initiative.
Baby bond
In August 2020, Murphy proposed creating a $1,000 "baby bond" for New Jersey's children, which would be payable with interest at the age of eighteen. It was ultimately dropped from budget proposals.
Education
Murphy has ordered a comprehensive review of the way charter schools in the state operate.
Several members of Murphy's transition team and others filed a lawsuit on May 17, 2018 to desegregate the public schools. Latino Action Network v. New Jersey is a lawsuit claims that the State of New Jersey provides separate and unequal schools to minority children in violation of their constitutional rights.
Sports betting
Murphy supports the legalization of sports betting—the placing of bets on professional and college sports matches. Following a ruling from the United States Supreme Court that eliminated restrictions, New Jersey created legislation to permit it, which Murphy signed into law on June 11, 2018.
Investigation into hiring practices
Role of First Lady
Tammy Murphy, the First Lady of New Jersey, is not elected and draws no state salary but is very involved in the administration.
In April 2018, Murphy was criticized for reportedly spending $13,000 of taxpayer money to create an office for his wife. Governor Murphy's spokesperson has defended the expenditures, arguing that Murphy's wife has taken a prominent enough role to warrant the office. Democratic state Assembly Majority Leader Lou Greenwald suggested that Tammy Murphy should be given an official title to reduce confusion.
Department of Education
Murphy first faced questions about his hiring practices when he selected Marcellus Jackson as an aide in the Department of Education. Jackson had served prison time for taking bribes as a councilman in Passaic County and thus was not allowed to hold public positions. Murphy stood by Jackson, but Jackson was forced to resign.
On October 15, 2018, an independent investigation into Murphy's hiring of former Schools Development Authority Chief of Staff Al Alvarez was commissioned. The next day, the New Jersey Legislature announced it would form an investigative panel regarding Murphy's hiring decisions. In June 2019 35 employees of the Schools Development Authority were fired after it was determined that the director appointed by Murphy had hired those connected to her.
Murphy also faces questions about Al Alvarez, who was accused of sexual assault by Katie Brennan, now chief of staff at the state's housing agency. Brennan alleged that Alvarez sexually assaulted her in April 2017, after a gathering of Murphy campaign staffers at a bar in Jersey City. Alvarez had offered to drive Brennan home and asked to go inside Brennan's home to use the bathroom. Once inside, Alvarez allegedly sexually assaulted her. Brennan claims she kicked Alvarez off and locked herself in a bathroom.
Brennan claims she brought her allegations to the Murphy camp three times. The first time was when she alerted the transition team after Murphy won the election in November 2017 while working for the transition team. Brennan again brought the complaint in March 2018 to Matt Platkin, chief counsel to the governor, who referred the matter to an ethics official in the governor's office. Brennan emailed Murphy and his wife on June 1, 2018, saying she wanted to discuss a "sensitive matter." No discussion ever occurred, but Brennan said a campaign attorney told her Alvarez would no longer have a state government job. Alvarez stayed at his job for about four months after Brennan was told he would be out. A legislative report as highly critical of how Murphy's team handle the matter. Alvarez claims defamation.
New Jersey Supreme Court Justice Peter Verniero will lead an independent investigation into a "systemic review of the hiring and vetting practices of the governor-elect’s transition office." Additionally, New Jersey Senate President Stephen Sweeney will form a six-member, bipartisan committee to investigate the handling of sexual assault allegations against Alvarez, among other issues.
"Murphy midterm" elections
In the November 2019 election, referred to as the "Murphy midterm", the 1st Legislative District, traditionally a Republican stronghold, elected Republicans changing the composition of the New Jersey Legislature.
Time out-of-state
Murphy spent 95 days out of state in 2019.
See also
Governorship of Chris Christie
References
External links
Murphy
2010s in New Jersey
2020s in New Jersey
2018 establishments in New Jersey
Governor of New Jersey |
The Movement for the Return of Constitutional Legitimacy – Zliten (in Arabic: زليتن مدينة - الدستورية للشرعية العودة حراك) seeks to reinstate the 1951 Constitution of Libya, proclaiming it a symbol of the sovereignty of the nation and a guarantor of unity. Zliten is one of the several cities within Libya that is actively involved in the larger movement, the Movement for the Return of Constitutional Legitimacy in Libya.
The Movement for the Return of Constitutional Legitimacy in Libya asserts that the internationally-recognized 1951 Constitution amended in 1963 established a legitimate and independent governing structure for the Libyan homeland and comprises the best solution for Libya’s future. Advocates for the movement in Zliten state that “[Libya’s] Constitution is a national social charter approved by a constituent body representing all the spectrums of the Libyan people […] Allah bless our independence!”
Along with revival of the 1951 Constitution, the movement, particularly in Zliten, supports the restoration of the Senussi monarchy with heir apparent Prince Mohammed El Senussi, son of Crown Prince Hasan as-Senussi and grandnephew of late King Idris, as its leader.
Support for the Zliten movement on social media
The Zliten local movement has an active presence on social media, including 14,786 total “likes” and 14,741 followers on its Facebook page. Below is a selection of posts from its page:
“Political malice as the purity of the Founding Fathers who have placed it for us, not a commodity in the market of political impurity.”
“The Constitutional Kingdom of Libya achieved social reconciliation and transitional justice […] The Constitutional Kingdom of Libya preserved the sanctity of citizens […] The Constitutional Kingdom of Libya has achieved for its citizens an adequate standard of living.”
Local events
The movement has hosted several events with hundreds of supporters in attendance focused on advocating for the restoration of the 1951 Libyan Constitution.
On December 24, 2015, the movement hosted an event in Zliten to celebrate the 64th anniversary of the Independence of Libya.
It hosted another event on February 17, 2016 for the adoption of the national anthem.
On December 24, 2016, the movement hosted a similar event in support of renewing the campaign to reclaim the deleted part of the national anthem. The details provided were:
“We call on the Libyan people to contribute to support this campaign aimed at restoring things to normal and a return to consider the leader of independence and founder of the state of modern Libya King The late Muhammad Idris al-Sanusi (may Allaah have mercy on him).”
Related international attention
An article in support of reestablishing the 1951 Constitution was published in the Washington, D.C.-based Middle East Institute.
The article refers to the 1963 Constitution as “more than an olive branch” and states the following:
“Libyans will have no choice but to soon make some hard decisions. One such option is returning to the region-conscious 1963 constitution. An earlier constitution in 1951 had granted a great deal of authority to the regions […]The return to the 1963 constitution is gaining momentum in Libya, with several movements, ranging from royalists to pro-democracy activists, calling for an adoption of the constitution.”
A similar article was published in Australia by The Australian magazine, noting that:
“Libyan monarchists are now quietly resurfacing, amid calls to revive the unifying constitution of 1951. A spokesman for Prince Mohammed said he was “ready to return to Libya if the people demand it […] Monarchy still works in North Africa and the Middle East. The Arab leaders overthrown in 2011 were the heads of republics. The royal dynasties of Morocco and Jordan (another kingdom forged with British support) remain hugely popular while demonstrating a knack for moving with the times.”
The article also states that:
“A restoration of the Senussi dynasty might help to reunite the warring tribes. Even some militia commanders favour a return of the monarchy. The spiritual status of the Senussi chiefs (Idris described himself as a direct descendant of the Prophet) would offer a strong religious counterpoint to the brutal fundamentalism of Isis.”
Mohammed El Senussi
Libyan royalists widely consider Prince Mohammed El Senussi, son of Crown Prince Hasan as-Senussi and grandnephew of late King Idris, to be the legitimate heir to the Senussi Crown of Libya.
The movement in Zliten has voiced its opinion that the natural solution to the Libyan crisis is to reinstate the 1951 Constitution (as amended in 1963) with Crown Prince Mohammed El Senussi as the legitimate leader. The Zliten movement promotes the Prince’s leadership on its Facebook page and frequently circulates articles and speeches from the Prince’s website.
References
Organizations based in Libya
Political movements |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.